Quick X Folder Preview · Troubleshooting

Why pstopdf Stopped Working, and What Actually Replaces It

Your script is fine. Apple deleted the pstopdf command itself in macOS Sonoma. We installed its usual replacement, timed it, and found a default setting that can quietly resize your output before you even notice.

By Ram Velmurugan · Founder & Lead Developer, 1dot.ai

Ghostscript 10.02.1 installed and tested Nov 21, 2026·9 min read
Quick answer: Apple removed pstopdf along with the rest of macOS's built-in PostScript-to-PDF conversion in macOS 14 Sonoma. Install Ghostscript (brew install ghostscript) and use its ps2pdf command instead. It is not an exact match: it has no -l or -p flag, and in our test it defaulted to the wrong page size for a Letter-sized document until we told it which paper size to use. Once you name the paper size (or add -dEPSCrop for EPS files), it produced a correctly sized PDF in well under a tenth of a second per file.

Editorial note: 1dot.ai makes Quick X Folder Preview, a folder and archive preview app for Mac mentioned near the end of this guide. It does not convert PostScript or EPS files and plays no role in the testing below. Every command in this guide was actually run, on Ghostscript 10.02.1, in a Linux container, not on a Mac. Ghostscript's commands and flags behave the same on every platform; where a result depends on something outside Ghostscript itself, a system paper-size default, we say so and show our work rather than assume it carries over to your Mac unchanged. Sources checked live on November 21, 2026.

The Short Version

If a shell script, a Makefile, or a scheduled job on your Mac suddenly fails with pstopdf: command not found, the tool did not move or get renamed. Apple deleted it. It shipped as a built-in command-line utility from early Mac OS X through macOS 13 Ventura, and Apple's own AppKit release notes for macOS 14 confirm the removal in writing, if indirectly: "NSEPSImageRep was deprecated in macOS 14.0 as encapsulated PostScript (EPS) files are no longer supported by macOS." Coverage of the same release at the time reported the fuller picture: the whole PostScript-to-PDF conversion stack went with it, pstopdf included.

This is the automation-side companion to our EPS Quick Look preview guide. That one covers Finder thumbnails and Preview, a viewing problem. This one covers scripts, Makefiles, and anything else that called pstopdf programmatically, an automation problem with a different fix and a gotcha of its own.

What pstopdf Did, and When It Left

Apple's own man page for the tool, mirrored on unix.com, describes the syntax plainly: pstopdf [inputfile] [-o outname] [-l] [-p] [-i]. Give it a PostScript file and it writes a matching .pdf in the current directory, unless -o names a different output path. -i reads PostScript from standard input instead of a file. -l writes conversion messages to a log file. -p prints a progress message to stdout after each page. It was a thin wrapper around Apple's own PSNormalizer engine and Core Graphics' CGPSConverter, the same machinery that let Preview open PostScript and EPS files directly.

The removal happened in stages, which is why old troubleshooting advice stopped working piece by piece. macOS 12.3 Monterey dropped inline PostScript viewing in WebKit (Safari) first. Ventura (macOS 13, October 2022) removed PostScript and EPS support from Preview itself. Then Sonoma (macOS 14, September 2023) removed the system-level conversion entirely. The Eclectic Light Company's contemporary reporting on Apple's own Sonoma release notes lists four concrete effects: CGPSConverter now returns an error when called, ImageIO no longer converts EPS files, NSEPSImageRep no longer displays them, and PMPrinterPrintWithFile rejects PostScript sent to a non-PostScript print queue. The pstopdf command-line tool went with the rest of that stack, since it had nothing left to call.

Developers noticed within days. An Apple Developer Forums post from September 2023 noted that both pstopdf and the PSNormalizer framework were gone from Sonoma. A MacRumors thread started on September 17, 2023 collected the fallout: man pages piped to Preview, Terminal printing, and other workflows people had used for decades. On November 26, 2023, a MacTeX user on Sonoma 14.1.1 reported that TeXShop's simpdftex script failed with /usr/bin/pstopdf: No such file or directory. Copying a pstopdf into /usr/local/bin did not help, because the script called the full /usr/bin path. That detail matters for the wrapper below.

The Replacement: Ghostscript's ps2pdf

Ghostscript is a free, open-source PostScript and PDF interpreter maintained by Artifex. It installs with Homebrew: brew install ghostscript. That gives you two relevant commands: gs, the interpreter itself, and ps2pdf, a small shell script bundled with it that wraps gs specifically for PostScript-to-PDF conversion, the same job pstopdf used to do.

For a plain file, the command is about as short as the one it replaces: ps2pdf input.ps output.pdf. If you only need the conversion and nothing about pstopdf's exact flags, that single line covers most scripts.

What We Measured: Speed and File Size

We wrote a one-page PostScript file (text and a filled rectangle, 612×792pt bounding box, the dimensions of US Letter) and a three-page version, then ran both through ps2pdf and through gs directly, timing each with the shell's built-in time:

FileCommandTimeOutput size
Single pageps2pdf0.066s2,519 bytes
Single pagegs -sDEVICE=pdfwrite0.080s2,425 bytes
Three pagesps2pdf0.087s3,321 bytes

Both tools confirmed a correct three-page PDF for the multi-page file (checked with pdfinfo). For a script converting a handful of files on demand, either command finishes before you'd notice a delay. Neither is the bottleneck in a build pipeline that also compiles LaTeX or runs other tools around it.

The Gotcha: a Page Size You Didn't Ask For

What we actually found
Our one-page test file declares a 612×792pt bounding box, exactly US Letter. Run through ps2pdf with no paper size specified, the output PDF came out 595×842pt, A4, not Letter. Ghostscript does not read the %%BoundingBox comment of a plain .ps file. It uses the page size the file sets in code, and when the file sets none, it falls back to a default. On our Linux test system that default came from /etc/papersize, set to A4 by the libpaper package Ghostscript is built against there.

A Mac fails in the opposite direction. Homebrew's Ghostscript formula has no libpaper dependency, and Ghostscript's documentation says it ships with US Letter as its default page size. We reproduced that setup by pointing our test system's paper default at Letter, then converted an A4 file that sets no page size. It came out 612×792pt, Letter, with the bottom of the page cut off. So the Mac risk falls on anyone converting A4 documents, which covers most of the world outside North America.

Two more runs showed how far the fix should go. Adding -sPAPERSIZE=letter alone fixed the undeclared Letter file. A file that sets its own page size in code (PostScript from printer drivers usually does) came out at its own size whatever the default was, with or without that flag. Adding -dFIXEDMEDIA, which many guides pair with the paper size, changed that. It forced an A4 file that declared its own size onto a Letter page. Name the paper size and leave -dFIXEDMEDIA out unless every file you convert really is that size. We can't run the real pstopdf anymore to see which default it used, so this is a statement about Ghostscript, not a before-and-after comparison.

Input fileCommandOutput page
Letter, size not set in codeps2pdf (A4 default)595×842 (A4), wrong
A4, size not set in codeps2pdf (Letter default, as on a Mac)612×792 (Letter), wrong
Letter, size not set in codeps2pdf -sPAPERSIZE=letter612×792, correct
Letter, size set in codeps2pdf (A4 default)612×792, correct
A4, size set in codeps2pdf -sPAPERSIZE=letter595×842, correct
A4, size set in codeps2pdf -sPAPERSIZE=letter -dFIXEDMEDIA612×792, wrong

All six runs used Ghostscript 10.02.1 on November 21, 2026, page sizes read with pdfinfo.

Converting EPS Files Specifically

EPS files carry their own bounding box rather than a full page size, so the fix is a different flag: -dEPSCrop. We ran a 200×150pt test figure both ways at the PDF stage. Without the flag, Ghostscript placed the artwork on a full default-size page (595×842pt in our test), with the figure small in one corner. With -dEPSCrop added, the output page measured exactly 200×150pt, matching the figure. Unlike a raster PNG conversion, where cropping a small logo out of a full page can cut the file size by nearly 90 percent (we measured that case in our EPS preview guide), the PDF file size barely moved here, 2,357 bytes against 2,367. For vector output the problem cropping solves is the page dimensions, not file bloat.

Your Options

Install Ghostscript and run ps2pdf

Ghostscript is a free, open-source PostScript and PDF interpreter maintained by Artifex, the same engine behind the fix we tested for EPS Quick Look previews. Install it with `brew install ghostscript`. It installs a `ps2pdf` command alongside the main `gs` binary.

For a plain `.ps` file: `ps2pdf input.ps output.pdf`. That is the direct equivalent of the old `pstopdf input.ps` for the common case, one file in, one PDF out.

Name the paper size instead of trusting the default. We measured a real case below where the default did not match the source document. Add `-sPAPERSIZE=letter` (or `a4`, whatever your documents use). Leave out `-dFIXEDMEDIA`, which several guides pair with it: in our test it forced an A4 document that declared its own size onto a Letter page.

Free, needs Homebrew and one Terminal command

Convert EPS files with -dEPSCrop

If your script converts `.eps` files specifically, skip the paper-size flags and add `-dEPSCrop` instead: `gs -dNOPAUSE -dBATCH -dEPSCrop -sDEVICE=pdfwrite -sOutputFile=output.pdf input.eps`. This sizes the output page to the EPS file's own bounding box, which is normally what you want for a logo, a chart, or any other small piece of artwork rather than a full page.

We ran this both ways on a 200×150pt test file. Without the flag, the artwork landed on a full default-size page. With it, the output page measured exactly 200×150pt, matching the source.

Free, one extra flag

Replace pstopdf with a small script that accepts its old flags

If a script calls `pstopdf` with its original flags (a bare file, `-o name`, or `-i` from stdin) and rewriting every call line is more work than you want, a small replacement script closes most of the gap. Make it a real file, not a function in `.zshrc`: a function defined in your shell profile is invisible to a Makefile or a `#!/bin/bash` script, which is exactly where `pstopdf` calls live. Save this as `/usr/local/bin/pstopdf` (or `~/bin/pstopdf` if that folder is on your PATH) and run `chmod +x` on it:

#!/bin/bash
# pstopdf replacement: maps the old flags onto Ghostscript's ps2pdf
outname="" fromstdin=0 infile=""
while [ $# -gt 0 ]; do
  case "$1" in
    -o) outname="$2"; shift 2 ;;
    -i) fromstdin=1; shift ;;
    -l|-p) shift ;;  # no ps2pdf equivalent; accepted and ignored
    *) infile="$1"; shift ;;
  esac
done
if [ "$fromstdin" = "1" ]; then
  exec ps2pdf - "${outname:-stdin.pdf}"
fi
base="${infile##*/}"
exec ps2pdf "$infile" "${outname:-${base%.*}.pdf}"

We called it from both bash and sh three ways: a file in another folder, -o with -l -p added, and -i from stdin. All three matched a direct ps2pdf run in page count, page size and file size. Like the original, it writes to the current directory when you don't pass -o, and names stdin output stdin.pdf, as pstopdf's man page specifies. It does not restore a log file or per-page progress output, since Ghostscript has no direct equivalent for either. Add -sPAPERSIZE=a4 or letter to the two ps2pdf lines if your files don't set their own page size.

One limit, from the MacTeX report above: if the broken script calls the full path /usr/bin/pstopdf, no replacement on your PATH will catch it. The error then reads No such file or directory rather than command not found. System Integrity Protection blocks adding files to /usr/bin, so edit that one line of the script to call pstopdf by name instead.

Free, one small script on your PATH

Run an older macOS in a VM, or use a paid converter you already own

If you need pstopdf's exact original behavior rather than a close equivalent, for example a one-off batch job where rewriting the script is not worth it, running a pre-Sonoma macOS version in a lightweight VM on Apple silicon gives you the real tool again, inside that VM. Adobe Acrobat's Distiller does PostScript-to-PDF conversion too, if you already have a paid Acrobat license. Both are heavier than installing Ghostscript, and neither is something to set up just for this.

Works, but neither is a casual option

Comparing Your Options

MethodMatches old behaviorCostRequires
ps2pdf / gs (Ghostscript)Close, once paper size is set explicitlyFreeHomebrew, one install
Wrapper scriptMatches pstopdf's file, -o, and -i flags exactly in our testFreeGhostscript, one script on your PATH
Adobe DistillerHigh, if you already use Acrobat for thisRequires a paid Acrobat licenseAdobe Acrobat Pro
Older macOS in a VMExact, the real toolFree to set up, heavy to maintainVirtualization software, a macOS installer image

Does Quick X Folder Preview Fix This?

No. Quick X Folder Preview adds Quick Look previews for folders, archives, source code, Markdown, Jupyter notebooks, LaTeX, data files, subtitles, torrents, web archives, ebooks, and comics, 13 extensions in total. None of them touch PostScript or EPS conversion, and the app doesn't run from a script in the way this problem calls for.

Honest status
If your actual problem is a script or build pipeline that calls pstopdf, Ghostscript above is the real fix. If your problem is instead that EPS files won't show a thumbnail in Finder, that's a related but separate issue, covered in our dedicated guide linked below.

Sources & Further Reading

Apple's own record of the removal: Apple Developer, "AppKit Release Notes for macOS Sonoma 14" (NSEPSImageRep deprecation) and Apple Support, "View .ps and .eps files on Mac".

The fuller breakdown of what Sonoma removed, including CGPSConverter and pstopdf by name: The Eclectic Light Company, "PostScript's sudden death in Sonoma".

Developer impact reports: Apple Developer Forums, thread 737545, MacRumors Forums, "PostScript is dead" (Sep 17, 2023), and a MacTeX mailing list report of a broken build script.

pstopdf's original syntax: unix.com, pstopdf(1) man page mirror.

Ghostscript's own project and documentation: ghostscript.com, and its usage guide (default Letter page size, -sPAPERSIZE, -dFIXEDMEDIA). Homebrew's build: ghostscript formula.

Our related coverage: Why EPS Files Won't Preview on Mac Anymore, and What to Use Instead, which covers Finder thumbnails and Preview rather than scripts, and our complete Quick Look troubleshooting guide for preview problems unrelated to PostScript.

Frequently Asked Questions

Why does my script fail with "pstopdf: command not found" on my Mac?
Because the tool is gone, not your script. Apple shipped a command-line pstopdf utility from early Mac OS X through macOS 13 Ventura. Its AppKit Release Notes for macOS 14 say NSEPSImageRep "was deprecated in macOS 14.0 as encapsulated PostScript (EPS) files are no longer supported by macOS," and coverage of the same release notes at the time (The Eclectic Light Company, Sep 25, 2023) reported that macOS removed the whole PostScript and EPS-to-PDF conversion stack, taking the pstopdf binary with it. If you're on Sonoma, Sequoia, or Tahoe and a script you wrote years ago calls pstopdf, that's why it stopped.
Is ps2pdf really a drop-in replacement for pstopdf?
For the common case, close to it, but not byte-for-byte identical in behavior. pstopdf's own syntax was `pstopdf [inputfile] [-o outname] [-l] [-p] [-i]`: give it a file and it writes a matching .pdf, -o names the output, -i reads from stdin. Ghostscript's ps2pdf takes a plain `ps2pdf input.ps output.pdf` and has no -i, -l, or -p flags at all. We tested a short wrapper script named pstopdf that maps the three most-used flags onto ps2pdf and ran it three ways (plain file, -o, and -i from stdin); all three produced the same page count, page size and file size as calling ps2pdf directly. The flags without a Ghostscript equivalent (-l for a log file, -p for per-page progress) have no real substitute. See the wrapper further down.
Will the PDF ps2pdf produces be the same size and page as my old pstopdf output?
Not automatically, and this is the part most guides skip. Ghostscript ignores a plain PostScript file's %%BoundingBox comment. If the file never sets a page size in code, Ghostscript uses its own default. We ran ps2pdf on a one-page file with a 612×792pt (US Letter) BoundingBox and no page size set. Our Linux test machine defaulted to A4 (595×842pt), so the page came out the wrong shape. A Mac goes wrong the other way: Homebrew's Ghostscript has no system paper-size setting, so it falls back to Ghostscript's built-in Letter default, and an undeclared A4 document comes out Letter. Adding `-sPAPERSIZE=letter` (or `a4`) fixed it. Files that do set their own page size, which printer-driver PostScript usually does, came out correctly with or without the flag. We can't run the original pstopdf anymore, so we can't compare the two tools output for output.
My script converts .eps files specifically, not .ps. Does anything change?
One flag. Add `-dEPSCrop` and Ghostscript sizes the output page to the EPS file's own bounding box instead of a full default page. We tested a 200×150pt EPS figure both ways: without -dEPSCrop, Ghostscript placed it on a full A4 page with the artwork in one corner; with it, the output page measured exactly 200×150pt. For PDF output specifically, the file size barely moves either way (2,357 vs 2,367 bytes in our test), the difference is the page dimensions, not the bytes. If you're converting EPS to a raster format like PNG instead of PDF, the file-size difference is much larger. Our separate guide on EPS Quick Look previews measured that case.
Is there any way to get the actual pstopdf back on a current Mac?
Not on the current OS itself. Multiple Apple Developer Forums and Apple Support Community threads from 2023 and 2024 confirm it's gone with no restoration path, and nobody has reported one since. The practical workarounds people actually use are Ghostscript's ps2pdf (free, scriptable, what this guide covers), a paid tool like Adobe Acrobat's Distiller if you already have a license, or running an older macOS version in a virtual machine purely to call the real pstopdf there. For a script you run regularly, Ghostscript is the only option on this list that doesn't involve either paying or keeping a second OS around.
Is it safe to run Ghostscript on PostScript files from the internet?
Give it the same caution you'd give any file-parsing tool, and keep it updated. Ghostscript has had a real history of security vulnerabilities, since a PostScript or EPS file is a small program the interpreter executes, not a passive document. Run `brew upgrade ghostscript` periodically, and be more careful with files from outside your own pipeline than with files you generated yourself.
Does Files Magic AI or Quick X Folder Preview replace pstopdf?
No, and we'd rather say that plainly than let the question hang. Neither app converts PostScript or EPS to PDF. Quick X Folder Preview adds Quick Look previews for folders, archives, and 11 other formats, none of them PostScript. Files Magic AI organizes, renames, and cleans up files already on disk. If what you actually need is to batch-rename or sort the PDFs your script produces after conversion, Magic Rename's content-aware renaming can take over from there, but the conversion step itself is Ghostscript's job, not ours.

The Bottom Line

Your script isn't broken. Apple deleted pstopdf in macOS Sonoma, along with the rest of the system's built-in PostScript-to-PDF conversion. Install Ghostscript and swap in ps2pdf, but don't copy the command verbatim from the first result you find. Name the paper size or add -dEPSCrop for EPS input, we measured a real case where skipping that step silently produced the wrong page size, and the wrapper script above covers pstopdf's old flags for scripts you'd rather not rewrite line by line.


Looking for more Mac troubleshooting guides? Read our EPS preview fix guide if your problem is Finder thumbnails rather than a script, see our complete Quick Look fix guide for preview problems unrelated to PostScript, browse every 1dot.ai guide, or check Quick X Folder Preview's product page for the full list of formats it covers.

Want Folder and Archive Previews Without Extracting?

Quick X Folder Preview adds 13 Quick Look extensions to the space bar, notarized by Apple. Free for 14 days, then $4.99 once for a lifetime license.

Try It FreeRead More Guides