Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PostScript PreviewNew to Visual Studio Code? Get it now.
PostScript Preview

PostScript Preview

Ahnaf An Nafee

|
12,893 installs
| (1) | Free
| Sponsor
PostScript Preview is an extension that helps to preview EPS and PS files in Visual Studio Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
PostScript Preview logo

PostScript Preview

Preview PostScript and EPS files without leaving Visual Studio Code.

Visual Studio Marketplace · Open VSX · Changelog · Feedback

Marketplace version Marketplace installs Marketplace rating Open VSX version
Test status CodeQL status License GitHub stars

Read requirements after install

PostScript Preview showing a PostScript document beside its source

Quick start

  1. Install PostScript Preview from the Visual Studio Marketplace or Open VSX.
  2. Install Ghostscript and Poppler for your operating system.
  3. Open a .ps or .eps file in Visual Studio Code.
  4. Select the preview icon in the editor title bar.

The Visual Studio Marketplace installs the companion PostScript Language extension automatically so Visual Studio Code can recognize PostScript files. Open VSX does not currently mirror that dependency; Open VSX and VSCodium users must first download its VSIX and run Extensions: Install from VSIX....

Highlights

Live preview
View .ps and .eps output beside the source file.
Multi-page navigation
Move between pages or jump directly to a page.
Pan and zoom
Inspect SVG output with smooth navigation controls.
Automatic refresh
Regenerate the preview whenever the source file is saved.
Theme-aware interface
Match Visual Studio Code's light and dark themes.
Custom background
Choose a preview color for transparent artwork.
Ghostscript output
Read output from ==, print, and other operators.
Configurable tools
Use custom Ghostscript and Poppler executable paths.

Requirements

PostScript Preview delegates document conversion to three command-line tools:

Tool Provided by Purpose
ps2pdf (gswin64c.exe on Windows) Ghostscript Converts PostScript or EPS to PDF.
pdftocairo Poppler Converts a PDF page to SVG for the preview.
pdfinfo Poppler Detects the number of pages in a document.

macOS

Install both dependencies with Homebrew:

brew install ghostscript poppler

Ubuntu and Debian

sudo apt-get update
sudo apt-get install ghostscript poppler-utils -y

Windows

Install Ghostscript with Chocolatey from an Administrator terminal:

choco install ghostscript -y

Download the latest prebuilt Poppler archive from poppler-windows, then extract it to C:\Program Files\poppler. The Chocolatey poppler package does not currently include a complete set of working Windows binaries, so the release archive is the recommended source.

Add the installed tools to the system PATH (the command detects the installed Ghostscript version):

$gs = (Get-ChildItem "C:\Program Files\gs\gs*\bin\gswin64c.exe" | Select-Object -Last 1).Directory.Parent.FullName
$popplerBin = (Get-ChildItem "C:\Program Files\poppler" -Filter pdftocairo.exe -Recurse | Select-Object -First 1).DirectoryName
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::Machine) + ";$gs\lib;$gs\bin;$popplerBin", [EnvironmentVariableTarget]::Machine)

Restart Visual Studio Code after installation.

If automatic PATH setup does not work, add these directories through System Properties → Environment Variables, replacing <version> with the installed Ghostscript version:

C:\Program Files\gs\gs<version>\lib
C:\Program Files\gs\gs<version>\bin
C:\Program Files\poppler\poppler-<version>\Library\bin

Configuration

Custom paths are useful for Conda environments and other non-standard installations. Open Visual Studio Code settings and search for PostScript Preview, or add the values directly to settings.json.

Setting Description Default
postscript-preview.path.ps2pdf Path to the ps2pdf executable. On Windows, the default safely invokes gswin64c.exe from PATH. ps2pdf
postscript-preview.path.pdftocairo Path to the pdftocairo executable. pdftocairo
postscript-preview.path.pdfinfo Path to the pdfinfo executable. pdfinfo
{
  "postscript-preview.path.ps2pdf": "/opt/ghostscript/bin/ps2pdf",
  "postscript-preview.path.pdftocairo": "/opt/poppler/bin/pdftocairo",
  "postscript-preview.path.pdfinfo": "/opt/poppler/bin/pdfinfo"
}

Using the preview

Multi-page documents

Navigation controls appear when a PostScript document contains multiple pages:

  • Select ◀ or ▶ to move one page at a time.
  • Enter a page number to jump directly to it.
  • Save the source file to regenerate the document and return to page 1.

Console output

To inspect Ghostscript output:

  1. Open the Output panel with Ctrl+Shift+U on Windows or Linux, or Cmd+Shift+U on macOS.
  2. Select PostScript-Preview from the channel list.
  3. Save or reopen the preview to run the converter.

Troubleshooting

Problem What to check
The preview icon is missing. Confirm the file's language mode is PostScript, then make sure the PostScript Language extension is installed and enabled.
A converter cannot be found. Run ps2pdf, pdftocairo, and pdfinfo in a terminal, or configure their absolute paths.
A newly installed tool is not detected. Restart Visual Studio Code so it receives the updated PATH.

If the problem continues, open an issue with your operating system, extension version, and the PostScript-Preview output.

Development

git clone https://github.com/ahnafnafee/PostScript-Preview.git
cd PostScript-Preview
corepack enable
yarn install
yarn compile

Press F5 in Visual Studio Code to open an Extension Development Host.

Tests

Command Coverage
yarn test:unit Fast tests for pure preview behavior.
yarn test:integration Extension activation and behavior inside a real Visual Studio Code host.
yarn test The complete unit and integration test suite.

See the testing guide for prerequisites, sample documents, and manual checks.

Credits

  • mkvoya/eps-preview — the original extension on which this project was based.
  • svg-pan-zoom — SVG pan and zoom controls.
  • Pickr — the preview background color picker.

License

PostScript Preview is available under the MIT License.

If PostScript Preview is useful to you, consider starring the repository or leaving a review on the Visual Studio Marketplace.

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