Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

benwiggy

macrumors 68020
Original poster
Jun 15, 2012
2,467
281
Sonoma has removed the pstopdf command, as well as the PSNormalizer framework which provides the PostScript interpreter for the OS.

You can still create PS to send to a printer, but there's no support for interpreting PS in the OS anymore. A sad day; though it's been coming for a long time.

Ventura removed Preview's ability to open PS files. CUPS set its default file format as PDF many years ago, and most printers have interpreted PDF natively for years.

If you've got EPS files, then you'll need a third-party app like Affinity Designer or Adobe Illustrator to view them. The old hack of modifying the OS QuickLook generator to view EPS files won't work now either. (And you should probably remove it.)

EPS as a format is unlikely to be deprecated in DTP apps (but never say never...), but I'd recommend converting all EPS files to PDF, which should be a drop-in replacement in any workflow.
 
Last edited:

Cromulent

macrumors 604
Oct 2, 2006
6,810
1,100
The Land of Hope and Glory
Sonoma has removed the pstopdf command, as well as the PSNormalizer framework which provides the PostScript interpreter for the OS.

You can still create PS to send to a printer, but there's no support for interpreting PS in the OS anymore. A sad day; though it's been coming for a long time.

Ventura removed Preview's ability to open PS files. CUPS set its default file format as PDF many years ago, and most printers have interpreted PDF natively for years.

If you've got EPS files, then you'll need a third-party app like Affinity Designer or Adobe Illustrator to view them. The old hack of modifying the OS QuickLook generator to view EPS files won't work now either. (And you should probably remove it.)

EPS as a format is unlikely to be deprecated in DTP apps (but never say never...), but I'd recommend converting all EPS files to PDF, which should be a drop-in replacement in any workflow.
That is really annoying as I used to export man pages in PS and then convert them to PDF for easier reading.
 

bogdanw

macrumors 603
Mar 10, 2009
6,099
3,011
That is really annoying as I used to export man pages in PS and then convert them to PDF for easier reading.
I used that too
Code:
man -t diskutil | open -fa "Preview"

oh noes looks like ghostscript via brew to the rescue
No need for homebrew, it can be built from source easily

- download Ghostscript Source (Ghostscript AGPL Release)
https://www.ghostscript.com/releases/gsdnld.html
ghostscript-10.02.0.tar.gz at the moment https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/latest/
- unarchive
- cd into ghostscript-10.02.0
- configure, make & install
Code:
./configure
make
sudo make install

The command above now becomes
Code:
man -t diskutil | ps2pdf - - | open -fa "Preview"
or to save as pdf
Code:
man -t diskutil | ps2pdf - diskutil.pdf
 
  • Like
  • Love
Reactions: macinfo and camelia

benwiggy

macrumors 68020
Original poster
Jun 15, 2012
2,467
281
No need for homebrew, it can be built from source easily
No need to build from source: this guy provides .pkg Installer files. (Assuming you trust people on the internet.)


Interestingly, man -t stills works, even though troff and groff were removed in Monterey, too! enscript went some years ago....
 
Last edited:
  • Like
Reactions: zevrix

bogdanw

macrumors 603
Mar 10, 2009
6,099
3,011
No need to build from source: this guy provides .pkg Installer files. (Assuming you trust people on the internet.)
https://pages.uoregon.edu/koch/
I have no problem with pkg/binary files from trusted sources.
As a general precaution, I upload them to VirusTotal.
Ghostscript-10.02.0.pkg from Richard Koch https://www.virustotal.com/gui/file/519550a704b3d605f1e423168c9bc1e47ddc737902aea6fb5af544491b87ff88
I have a problem with homebrew being considered as a must on macOS. :)
 

throAU

macrumors G3
Feb 13, 2012
9,137
7,294
Perth, Western Australia
I used that too
Code:
man -t diskutil | open -fa "Preview"


No need for homebrew, it can be built from source easily

- download Ghostscript Source (Ghostscript AGPL Release)
https://www.ghostscript.com/releases/gsdnld.html
ghostscript-10.02.0.tar.gz at the moment https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/latest/
- unarchive
- cd into ghostscript-10.02.0
- configure, make & install
Code:
./configure
make
sudo make install

The command above now becomes
Code:
man -t diskutil | ps2pdf - - | open -fa "Preview"
or to save as pdf
Code:
man -t diskutil | ps2pdf - diskutil.pdf
Yeah but security updates are a case of doing all that periodically (for every open source install on your machine) as opposed to

brew update
brew upgrade

(which does them all at once).

home-brew isn't a must, but it makes keeping a whole swathe of dependencies and other desirable packages up to date in two commands, and pretty sure upgrade will run update first these days soo...

I'm a big fan of making keeping things upgraded easy. And remembering where to download every package on your system, keep track of changes, etc. is busy work that a package manager can do. Compiling from source is a great option to have, but it's just way less maintainable for the average user. Been there, done that with Slackware in 1995.

If you really want to watch software compile home-brew can compile from source with -s
 
Last edited:

jasnw

macrumors 65816
Nov 15, 2013
1,030
1,134
Seattle Area (NOT! Microsoft)
Just switched to Sonoma and the wheels just keep falling off. I do most of my work in Terminal, and the first time I try to print a simple text file I get "lpr: Unsupported document-format “application/postscript”". This is to a reasonably-new Canon TS9250, and I have for over 20 years used enscript for printing. So, WTF?!?!? Googling doesn't tell me if this printer is PostScript capable (anyone know the answer to that) and I'm stuck having to go through a multi-step process from enscript to ghostscript to produce a PDF which I can then print. Is there an easier fix for this? And DAMN Apple for dropping PostScript support. And stuff all those new emojis where the sun don't shine. <<SIGNED>> Riled Apple Mac User <<SIGNED>>
 

gilby101

macrumors 68030
Mar 17, 2010
2,921
1,616
Tasmania
There is nothing easy.

A good post here https://eclecticlight.co/2023/09/25/postscripts-sudden-death-in-sonoma/ and three suggestions as to how to proceed https://eclecticlight.co/2023/09/27...nd-eps-files-in-sonoma-in-a-vm-apple-silicon/. If it were me, I would choose the Ghostscript option using Homebrew.

If your printer is postscript capable, this may help https://discussions.apple.com/thread/255651306?sortBy=best. Essentially add -l to your apr command.

Read this https://forums.macrumors.com/threads/postscript-is-dead.2402474/ which suggests the Ghostscript solution.
 
Last edited:
  • Like
Reactions: organicCPU

organicCPU

macrumors 6502a
Aug 8, 2016
836
294
I guess that Canon TS9250 isn't a PostScript printer. At least the Canon TS9550 doesn't have any reference to PostScript in its manual.
 

bzgnyc2

macrumors 6502
Dec 8, 2023
373
402
I couldn't find any reference to PS and the TS9250 anywhere, so I'm assuming that's the case. Looks like I'm stuck with a Ghostscript kludge.

To be realistic I've never seen inkjet printers in that price range with builtin PostScript. Generally they were the upper-end pro models. "Pro" and "enterprise" office printers do often include PostScript (typically not Adobe) with prices in the $200-300 for a basic B&W laser printer and $300+ for color. Otherwise I think the assumption is raster printing is good enough for the consumer segment and otherwise you're were already planning to spring for an external, commercial-grade PostScript RIP (Raster Image Processor).

Note that if your source is text, man pages (aka ROFF), etc, you might be better off finding programs which can generate PDF directly rather than creating a text -> PostScript -> PDF chain. For example, besides GUI programs like TextEdit, GNU enscript (among I am sure many others) can generate PDF files which you could then easily print or open in Preview.
 
Last edited:

steve123

macrumors 65816
Aug 26, 2007
1,151
716
Did Apple ever offer an explanation why they removed postscript? This problem also affects applications run with Wine.
 

bzgnyc2

macrumors 6502
Dec 8, 2023
373
402
Did Apple ever offer an explanation why they removed postscript? This problem also affects applications run with Wine.

As best I can tell they only provided release notes to the effect at each step of removing support but not actual explanations. In general it doesn't appear Apple likes to provide explanations behind design decisions like this...

However, this article offers a reasonable explanation:
https://appleinsider.com/articles/23/09/27/sonoma-puts-the-last-nail-in-the-coffin-for-postscript-on-macos

Also this isn't the first time the issue has come up on MR...
https://forums.macrumors.com/thread...a-drops-support-for-postscript-files.2367447/
 

jasnw

macrumors 65816
Nov 15, 2013
1,030
1,134
Seattle Area (NOT! Microsoft)
Note that if your source is text, man pages (aka ROFF), etc, you might be better off finding programs which can generate PDF directly rather than creating a text -> PostScript -> PDF chain. For example, besides GUI programs like TextEdit, GNU enscript (among I am sure many others) can generate PDF files which you could then easily print or open in Preview.
I use the enscript supported by MacPorts which does not appear to provide PDF output. So the GNU version, which looks to be several years more recent that the MacPorts version, does indeed provide PDF output? That would provide a simpler solution. Just create the PDF with enscript and push the PDF file to the printer using lp.

LATER: Downloaded the latest GNU enscript and it's the same version (1.6.6) as the MacPorts. No mention anywhere of PDF generation via enscript.
 
Last edited:

bzgnyc2

macrumors 6502
Dec 8, 2023
373
402
I use the enscript supported by MacPorts which does not appear to provide PDF output. So the GNU version, which looks to be several years more recent that the MacPorts version, does indeed provide PDF output? That would provide a simpler solution. Just create the PDF with enscript and push the PDF file to the printer using lp.

My mistake -- I must have been in some alternate universe when I saw PDF output as an option for GNU Enscript. In this one it still only supports output to PostScript, HTML, and RTF (and text terminals and line printers). It also doesn't support UTF-8 and no signs of updates on the way....

Then I saw some references to outputing PDF from Enscript on Linux systems but upon closer examination it appears those people have their printers named PDF with an automatic PostScript-to-PDF conversion behind the scenes...

There are some simple text to PDF converters out there (a2pdf, based on Perl modules, might work) but if you need full Enscript functionality then you're probably back to setting up a ps2pdf script/automatic conversion in the printer subsystem via Ghostscript.

For ROFF, as in printing man pages as another poster liked to do, there is a PDF output device in recent versions of GROFF:
 

jasnw

macrumors 65816
Nov 15, 2013
1,030
1,134
Seattle Area (NOT! Microsoft)
Thanks for the verification on enscript and the additional info. If I'm going to need a wrapper to make this work I'd rather make my own to fit my specific needs so I understand what's going on behind the screen. Us "Old Timey Programmers" (tm) are like that. I'm already about half-way there.
 

ipaqrat

macrumors 6502
Mar 28, 2017
379
419
Technically, a PDF couples postscript data to the device independent software-RIP'd layer - like EPS with a super-preview; the RIP part is done in advance as a favor to the printer/user, which became feasible with (A.) Adobe's essentially free license and (B.) processors fast enough not to need dedicated chipsets in the printer.

After the format's popularization, creating PDFs became more closely associated with file save/export, and most kids won't have seen Adobe's separate Distiller App in action. But the PostScript mathematical object/page description portion is still in there, which is how conversion between formats is so reliable - you're either soft-rip'ing to get a PDF, or stripping the soft-rip off to get the .PS.

I guess any good PDF viewer is doing what Apple's previewer did and more, considering how fast PCs are now.

One question is "Why now?" After dragging is along, for all these years... Could Adobe be pulling **** moves with it's long term industrial licensees, the way they're trying to jerk consumers around? Are there legal terms involved in new AI initiatives? Privacy rules? Free stuff never really being free?
 

ipaqrat

macrumors 6502
Mar 28, 2017
379
419
Kinda sad really.

I remember when Postscript was new. It was so great; no more bitmapped fonts and fontsets for all sizes, infinitely resizable graphics, working with postscript curves in Adobe Illustrator. I loved Illustrator.

Time flies.
And flown it has! Remember when camera ready-laser printing was so exotic and expensive that only successful newspapers and press shops could afford it? Dedicated output bureaus? An 11 X 17 full bleed laser imager (the laser/mechanical portion) might cost @ $10,000 US, and the PostScript RIP would cost another 10... For 600 DPI! 🎵 Agfa. Scitex. Linotype. Those were the dayyyyyssss 🎶

I always preferred Macromedia Freehand, although I liked the rest of Adobe's suite. I liked PageMaker instead Quark XPress, so I never quite warmed up to InDesign. Workflow automation wasn't my Agency's thing.

I made a smooth transition to Affinity Designer, which reminds me of Freehand. One feature I miss a lot is bitmap autotrace. I still do a lot of artwork in ink, because I'm very fast when I get in my groove. And sometimes customers bring in hardcopy of products done so long ago, the files would be useless. Also, color separations would be nice; There is still a light demand for low end spot color.

Affinity Publisher is Quarky-InDesigny, so meh. Affinity Photo is a totally viable replacement for Photoshop; little behind the curve on fancy AI filtering. Let's face it, there's a reason Adobe is an 800 lbs gorilla in the market.

I don't do graphics commercially, much, anymore. In 1997, I made a hard turn into IT and Security. Left professional graphics behind. Still noodle around for charities and volunteering.
 
Last edited:

bzgnyc2

macrumors 6502
Dec 8, 2023
373
402
Thanks for the verification on enscript and the additional info. If I'm going to need a wrapper to make this work I'd rather make my own to fit my specific needs so I understand what's going on behind the screen. Us "Old Timey Programmers" (tm) are like that. I'm already about half-way there.

I understand...I couldn't help but write some scripts to do my own ETL/ELT and then learned UTF-8 encoding the other day (well it all took more than a day) when I am really supposed to be using blackbox cloud stuff...

If you do write a full-fledged replacement for Encript that outputs direct to PDF would be great to share with the world. I know "lp/lpr file.ps" was the de facto API for printing from UNIX for many years but it seems like PDF has taken the crown from PostScript. I am surprised that so many basic UNIX programs still output only PostScript/have no option for PDF (e.g. GNU enscript, GNU a2ps, vim).
 

jasnw

macrumors 65816
Nov 15, 2013
1,030
1,134
Seattle Area (NOT! Microsoft)
If you do write a full-fledged replacement for Encript that outputs direct to PDF would be great to share with the world. I know "lp/lpr file.ps" was the de facto API for printing from UNIX for many years but it seems like PDF has taken the crown from PostScript. I am surprised that so many basic UNIX programs still output only PostScript/have no option for PDF (e.g. GNU enscript, GNU a2ps, vim).
That would be good fun, but it would take away from my day job - semi-retirement. I'm just wrapping a shell script around enscript that hides the PS-to-PDF conversion so I can get back on the job.
 
  • Like
  • Haha
Reactions: trusso and steve123

benwiggy

macrumors 68020
Original poster
Jun 15, 2012
2,467
281
Did Apple ever offer an explanation why they removed postscript?
I suspect it's because PS is a fully-functioning programming language. Someone once did something mad like writing an email server in PS. No doubt it's full of vulnerabilities due to its 1980s' assumptions about security, and you could probably craft a 'malicious' PostScript file. Adobe ceased development years ago.

Note that macOS still produces PostScript as output for a printer: it just no longer interprets PS to produce graphics. (Or email servers.)

You can create man pages directly to PDF with the following:

Code:
mandoc -T pdf -O paper=a4 $(man -w ls) > man-ls.pdf
 

steve123

macrumors 65816
Aug 26, 2007
1,151
716
Note that macOS still produces PostScript as output for a printer: it just no longer interprets PS to produce graphics. (Or email servers.)
The issue that Apple overlooked was creating PDF's. They support creating a PDF with a macOS print option but this does not work from VM's and Wine. They need to create a PDF printer driver that can be selected from within a VM or Wine bottle.
 

benwiggy

macrumors 68020
Original poster
Jun 15, 2012
2,467
281
They need to create a PDF printer driver that can be selected from within a VM or Wine bottle.
It's possible to create a PDF print queue. The most famous one is CUPS-PDF. https://www.cups-pdf.de/download.shtml
I've also written one here:

The interoperability of VMs and WINE with the Mac's printing system is not entirely Apple's responsibility, is it?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.