PDF Editor for Visual Studio Code
English | 日本語版
View, edit, and save PDF files directly in the VS Code editor without converting them to another format. The extension works offline and does not send document data to external servers.
Features
- On-demand page rendering, continuous scrolling, thumbnails, zoom, fit to width or page, and page navigation
- Select, copy, and search PDF text. Replace or move existing text, and change its size, color, or rotation.
- Add text, rectangles, ellipses, lines, and arrows.
- Fill in AcroForm fields and save values such as checkbox states.
- Add, delete, rotate, and duplicate pages. Merge PDFs, insert pages from another PDF, and extract pages.
- Edit metadata, undo and redo changes, track unsaved edits, and recover edits with hot-exit backups.
- Use VS Code light and dark themes, the Command Palette, context menus, and keyboard shortcuts.
- Runs on Windows, macOS, and Linux. Japanese text uses locally installed CJK fonts that the extension embeds in the PDF.
Usage
- Click a PDF file to open it in
PDF Editor. If another viewer opens by default, right-click the editor tab, choose Reopen Editor With, and select PDF Editor.
- Use the toolbar dropdown to switch selection modes. In Select text mode, double-click text to edit it in place. Press
Enter or click outside the input to apply the change to the PDF preview. Press Shift+Enter to insert a line break or Esc to cancel. In Select shapes mode, click a shape to select it.
- Choose Text and click the placement point on the page. Enter your text and press
Enter to place a frame fitted to the text, with its top-left corner at the point you clicked. To add a shape, choose an insertion tool and click where you want to place it. Drag a corner handle to resize a rectangle, circle, or ellipse. The cursor changes to a double-headed arrow over the handle. Drag the middle of a line or arrow to move it, or drag either endpoint to change its length or direction.
- Press
Ctrl+S or Cmd+S to save. VS Code's standard Undo, Redo, and Auto Save settings apply.
To create, merge, or extract a PDF or edit its metadata, search for PDF Editor in the Command Palette.
Settings
| Setting |
Description |
pdfEditor.defaultZoom |
Initial zoom level |
pdfEditor.renderQuality |
Canvas rendering density |
pdfEditor.showThumbnails |
Whether to show thumbnails by default |
pdfEditor.maxFileSizeMB |
File size threshold for a large-file warning |
pdfEditor.backupEnabled |
Whether to back up unsaved edits |
The extension uses Japanese when the VS Code display language is Japanese. It uses English for all other display languages.
Security and limitations
The webview enforces a strict Content Security Policy. It does not run JavaScript embedded in PDFs or open external links from them. Core features work offline.
The current pdf-lib adapter flattens edits to existing content into replacement content on the page. This preserves the appearance in standard PDF viewers. Use a dedicated redaction tool to permanently remove sensitive information. The extension currently has no support for arbitrary PDF operator rewriting, OCR, encrypted PDFs, digital signature preservation, or paragraph reflow. See the requirements coverage and architecture.
Development
npm install
npm run check
npm test
npm run compile
Open this folder in VS Code and press F5 to launch the Extension Development Host. Run npm run package to generate a VSIX package.
License
MIT. See THIRD_PARTY_NOTICES.md for dependency licenses.
| |