Had command line image editing tool Sips been disabled for PDFs with OS Ventura?

I sporadically use Sips codes to rapidly bulk-edit (resize, reformat, rotate, etc.) piles of PDFs.


I just ran a simple bit of rotation code and found it no longer works. Having investigated further, none of the various codes I've saved for these actions work. I'm getting a lot of "Cannot extract image from file" errors.


However, the same code works totally fine on PNGs, JPEGs, etc.


Anyone have any insights or fixes? I know I can build something in automator but I like the simplicity and speed of just running folders through Sips.


I've found Finder and Preview to be a bit temperamental in Ventura, not sure if that's related.

MacBook Pro 14″, macOS 13.3

Posted on May 24, 2023 04:16 AM

Reply

Similar questions

15 replies

May 24, 2023 05:27 AM in response to irny

The PDF rotation functionality that does work on Monterey 12.6.6 fails with an error on Ventura 13.4 when using different source PDFs. I have tried with single-page text PDFs and those with a single equation on them and it consistently fails to perform the rotation on Ventura 13.4.


The following is from Monterey 12.6.6:


sips -r 45.0 -o foo.pdf testx.pdf


Sips was the only command-line tool installed by macOS that can/could rotate PDFs (prior to macOS 13.4). I don't have macOS 13.3.1 (a) to test if it was broken in earlier Monterey updates. It is possible to build a Python3 solution that uses Apple's PDFKit framework to rotate PDFs but these are constrained to 90° increments of rotation.


Are your PDF page rotations always 0, 90, 180, or 270-degree choices?

May 24, 2023 07:17 AM in response to etresoft

Both ImageMagick and GraphicsMagick convert the PDF to raster losing the original PDF sharpness. Thought about that too and their compilation process from source on macOS has other dependencies and related skill sets. The open-source qpdf is perfect for this rotation solution but it too requires build from source (or homebrew) and wants cmake too.


One can even rotate PDF content using MacTeX 2023 and the pdfpages package:



pdflatex rotpdf.tex


which writes the rotated result in rotpdf.pdf.

May 24, 2023 05:58 AM in response to VikingOSX

Yes, the content is almost always old documents with landscape-orientated content that seem to have been bulk scanned and left in a vertical orientation, so it's usually 90º or 270º. It had never occurred to me to try anything less square, to be honest.


I'm fairly confident that I rotated PDFs successfully on my last MacBook (2015, running Monterey) too. I haven't used Sips on Venture prior to today as I've only been using this machine for a few weeks (and it shipped with Ventura). It fails on any PDF I try, both on an external APFS SSD and the local HD.


Conversion between PDF and other image formats also seems to be non-functional, though I can't recall if it used to be and don't have my old Monterey machine to hand to check.


I'm happy enough to do a quick Folder Action workflow rather than building a custom Python solution, I'm mainly just checking that I'm right in thinking that Sips doesn't work for PDF any more, and wondering why this is the case.

May 24, 2023 06:03 AM in response to dialabrain

Sips has been remarkably useful to me over the last few years for its capacity to adjust hundreds of image-based files in moments. The most accessible guides I found for it are here and here.


Between Sips and a couple of other small programs—specifically Find Any File and A Better Finder Rename—I've been able to wrangle huge file archives into shape very efficiently.

May 24, 2023 06:55 AM in response to irny

PDF is not really an image format. And Apple's support for PDF isn't very good. If sips can no longer do this, then there isn't any workaround to make it. It's done. You would have to use some other tool. There are a lot of tools that operate on PDF, but they won't be easy to use. And I think you'll find that none of them will work for image files.


I recommend you just convert those PDF files to a different format. That should eliminate the problem.

May 24, 2023 07:04 AM in response to etresoft

Yes, I'm being a bit slow on the uptake today and just come to a similar conclusion regarding PDFs not being images.


Due to various corporate IT restrictions that the file users face (and sheer number of files in the system) I'll have to leave them as PDFs.

I suppose you can probably build some kind of workflow that rotates PDFs through Preview, but I think I'll just use an older MacBook that's stuck on Monterey to run Sips on large datasets.


I've submitted a bug report on the off-chance Apple feels like making this work again, though I shan't be too optimistic.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Had command line image editing tool Sips been disabled for PDFs with OS Ventura?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.