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

|
11,196 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

Version Rating Installs

PostScript Preview Logo


Read Requirements After Install

PostScript Preview for VS Code

A popular PostScript and EPS file previewer for Visual Studio Code — Preview, pan, zoom, and debug your .ps and .eps files directly in VS Code. Supports multi-page documents, GhostScript console output, custom themes, and more.

✨ Features

  • Live Preview — View EPS and PS files side-by-side with your code
  • Pan & Zoom — Smooth SVG-based pan and zoom controls
  • Multi-Page Support — Navigate through multi-page PostScript documents
  • Theme Support — Automatic light/dark mode matching VS Code theme
  • Background Color Picker — Customize preview background color
  • Console Output — View GhostScript output (from ==, print, etc.)
  • Custom Paths — Configure paths to GhostScript and Poppler tools
  • Auto-Refresh — Preview updates automatically when you save
PostScript Preview Demo

🚀 Quick Start

  1. Install this extension from the VS Code Marketplace
  2. Install GhostScript and Poppler
  3. Open any .ps or .eps file
  4. Click the preview icon in the editor title bar

📋 Requirements

This extension requires:

  • PostScript Language extension for syntax highlighting
  • GhostScript (provides ps2pdf)
  • Poppler (provides pdftocairo and pdfinfo)

macOS

brew install ghostscript poppler

Ubuntu / Debian

sudo apt-get install ghostscript poppler-utils -y

Windows

Install via Chocolatey (run as Administrator):

choco install ghostscript --version 9.55.0 --force -y
choco install poppler --version 0.89.0 -y --force

Add to PATH:

[Environment]::SetEnvironmentVariable("Path",[Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::Machine) + ";C:\Program Files\gs\gs9.55.0\lib;C:\Program Files\gs\gs9.55.0\bin;C:\ProgramData\chocolatey\lib\poppler\tools",[EnvironmentVariableTarget]::Machine)

Restart VS Code after installation.

Manual PATH setup

If you have issues setting PATH, add these manually via System Properties → Environment Variables:

C:\Program Files\gs\gs9.55.0\lib
C:\Program Files\gs\gs9.55.0\bin
C:\ProgramData\chocolatey\lib\poppler\tools

Configuration

Configure custom executable paths in VS Code settings (useful for conda environments or non-standard installations):

Setting Description Default
postscript-preview.path.ps2pdf Path to ps2pdf executable ps2pdf
postscript-preview.path.pdftocairo Path to pdftocairo executable pdftocairo
postscript-preview.path.pdfinfo Path to pdfinfo executable pdfinfo

Example settings.json:

{
    "postscript-preview.path.ps2pdf": "/opt/ghostscript/bin/ps2pdf",
    "postscript-preview.path.pdftocairo": "/opt/poppler/bin/pdftocairo"
}

Multi-Page Documents

For PostScript files with multiple showpage commands, navigation controls appear automatically:

  • ◀ / ▶ — Navigate between pages
  • Page input — Jump to a specific page

The preview resets to page 1 when the source file is modified.

Console Output

View GhostScript output in VS Code:

  1. Open Output panel (Ctrl+Shift+U / Cmd+Shift+U)
  2. Select "PostScript-Preview" from the dropdown
  3. Output from ==, print, and other operators will appear here

Known Issues

None currently. Report issues here.

Credits

  • mkvoya/eps-preview — Original base extension
  • svg-pan-zoom — Pan and zoom library
  • pickr — Color picker library

Development

See TESTING.md for local development instructions.

yarn install
yarn compile
# Press F5 in VS Code to launch Extension Development Host

License

MIT


⭐ If you find this extension useful, please star the repo and leave a review!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft