Automator creates PDF of unusually large size (12.5 MB vs 84.6 MB)

I have 25 JPEGs using 12.5 MB. When I use the quick action "Create PDF" the result is a 12.5 MB PDF as expected.

I have created an app in Automator that collects the files in a specific library "Scanner", creates a single PDF from its contents and then renames it to a specific time stamp. The Automator action "New PDF from Images" creates a PDF of 84.6 MB from the exact same 25 JPEGs. Something is obviously wrong here.


The 25 JPEGs:


PDF from "Create PDF" quick action:


Automator:


Automator creates a much larger PDF from the exact same files:


iMac 27″, macOS 10.15

Posted on Feb 16, 2021 1:24 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 16, 2021 2:45 PM

The bad news is that if you want minimal PDF size from multiple images then it will have to be the interactive Finder approach, with n-tuple image selections followed by Create PDF. There is no fix for whatever that Automator action is doing internally to maximize PDF size.


The Finder's internal plug-in, Create PDF, and Automator's New PDF from Images action likely use two entirely different approaches to producing a PDF from images, based on your results.


One approach to PDF generation uses the comparatively simplistic PDFKit framework code to initialize each new PDF page with an image, append those pages, and then write the resultant PDF to disk. The other, and more powerful, yet harder to code Quartz 2D graphics context approach is likely what the FInder is using with its Create PDF plug-in.


4 replies
Question marked as Top-ranking reply

Feb 16, 2021 2:45 PM in response to bernie274

The bad news is that if you want minimal PDF size from multiple images then it will have to be the interactive Finder approach, with n-tuple image selections followed by Create PDF. There is no fix for whatever that Automator action is doing internally to maximize PDF size.


The Finder's internal plug-in, Create PDF, and Automator's New PDF from Images action likely use two entirely different approaches to producing a PDF from images, based on your results.


One approach to PDF generation uses the comparatively simplistic PDFKit framework code to initialize each new PDF page with an image, append those pages, and then write the resultant PDF to disk. The other, and more powerful, yet harder to code Quartz 2D graphics context approach is likely what the FInder is using with its Create PDF plug-in.


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.

Automator creates PDF of unusually large size (12.5 MB vs 84.6 MB)

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