Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>macOS PDF OpenerNew to Visual Studio Code? Get it now.
macOS PDF Opener

macOS PDF Opener

vinayski

|
1 install
| (0) | Free
Open local PDFs outside VS Code in macOS Preview (default) or Adobe Acrobat/Reader.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

macOS PDF Opener

"i clicked a PDF. VS Code showed me its internal organs."

click a local PDF. read it in built-in macOS Preview. Adobe Acrobat or Acrobat Reader is an explicit optional choice. your Mac already has a PDF viewer. we gave it the work.

no runtime npm dependencies. no embedded PDF renderer. no telemetry or network requests. no webview scripts or bundled executable. the document opens in a separate application window, not inside VS Code. this extension is a doorman, not a second apartment for PDF parsing.

Install: give the PDF a forwarding address

Requirements: macOS, VS Code 1.85 or newer, and Preview registered with macOS Launch Services (included with macOS).

  1. Install macOS PDF Opener from the VS Code Marketplace (vinayski.acrobat-pdf-opener), or install a locally built VSIX using Extensions: Install from VSIX....
  2. Run PDF Viewer: Use as Default PDF Opener from the Command Palette.
  3. Close any already-open PDF text tabs and click the PDF again.

The command preserves other editor associations and sets:

"workbench.editorAssociations": {
  "*.pdf": "acrobatPdfOpener.pdf"
}

Workspace settings or another profile may override this user-level setting. In that case, use Reopen Editor With..., choose macOS PDF Viewer (external), then Configure default editor for '*.pdf' in that workspace/profile.

Explorer files and chat links that VS Code routes through its normal editor resolver use this association. A chat provider that forces the text editor or opens an external URL can bypass it; this extension cannot intercept those links. Use PDF Viewer: Open PDF for an explicit launch or retry.

the association handles the normal route. a chat provider taking a private helicopter around it is outside our jurisdiction.

To choose Acrobat instead, set "acrobatPdfOpener.application": "acrobat" in your user settings. The default is "preview". This is an application-scoped setting: a workspace cannot choose the external application for you. Changing it applies to the next launch or explicit retry.

The extension ID is now vinayski.acrobat-pdf-opener. If you installed an earlier local VSIX as megamanics.acrobat-pdf-opener, uninstall that extension before installing this one to avoid duplicate PDF handlers. In VS Code Insiders, perform both actions in Insiders rather than stable VS Code.

The custom editor ID and command IDs retain their original acrobatPdfOpener names for compatibility with version 0.1.0 associations. Version 0.2.0 intentionally changes the default from Acrobat to Preview.

What happens: one PDF, one handoff

  • The custom editor shows a script-free status page, not PDF text.
  • Each custom document launches once, not on every focus change.
  • Closing and reopening the tab, restoring a tab after restart, or explicitly running PDF Viewer: Open PDF launches again.
  • Only local, regular .pdf files are accepted, including symlinks to regular files. Remote files must be downloaded first.
  • A trusted workspace is required. Browser-only VS Code is unsupported.
  • Preview launches directly through Launch Services with the fixed com.apple.Preview application ID, without an AppleScript lookup. If you explicitly choose Acrobat, its fixed application ID is tried first, then Reader only if Acrobat is absent. Neither choice falls back to the other or a generic opener.
  • Missing applications, unreadable paths, and launch failures appear in VS Code and in the Acrobat PDF Opener output channel.

The extension does not make PDFs safe: keep macOS, your chosen viewer, and VS Code updated and only open documents you trust. macOS accepting a launch request does not prove the viewer successfully rendered the document.

the icon smiles. the security boundary does not change.

Develop and verify: trust is earned, not declared

No dependency installation or compilation is needed.

npm test
npm run check
# Requires an existing, trusted installation of the vsce packaging tool:
npm run package

A real editor-host integration test is included. Use an isolated user-data and extensions directory so the test does not alter your everyday editor settings:

ACROBAT_TEST_PDF=/absolute/path/to/document.pdf \
  code --new-window \
  --user-data-dir /tmp/acrobat-editor-test-profile \
  --extensions-dir /tmp/acrobat-editor-test-extensions \
  --extensionDevelopmentPath="$PWD" \
  --extensionTestsPath="$PWD/test/integration.js"

The integration test checks activation, the PDF default association, and normal file-open resolution to the custom editor. It does not claim to verify a chat provider's click handler or the viewer's rendered output. Results are written to $TMPDIR/acrobat-pdf-opener-integration.json.

Quick demonstration

Run PDF Viewer: Use as Default PDF Opener, then click a local PDF; it opens in macOS Preview by default, outside VS Code.

Remove: no exit interview

Uninstall the extension, then remove the *.pdf entry for acrobatPdfOpener.pdf from your editor associations, or configure another default PDF editor. No system-wide PDF associations are changed.

the doorman leaves. the building stays where it was.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft