Problem printing to PDF with multiple pages on Monterey

hello, I noticed one problem when converting to pdf from Preview

I use Markup Toolbar to edit documents and starting with Monterey I noticed that the process of exporting the finished file to pdf is not working aaas it should when it contains multiple pages. What is happening, the first page is multiplied, replacing the rest of the pages. Actually all pages are replaced with the first page. If i have one file with 5 pages, first page is shwing fine and on the rest of 4 I have the same first page.


This is what I usually edit the files, open the pdf in Preview, Markup Toolbar, edit the file adding text/signature etc, File, Export, select PNG (to embed the edits into the file), Save. I open the png file where all pages are showing just fine, then File, Print, select PDF and Save as PDF and finally Save. The final PDF contains first page on all pages.

MacBook Pro 15″, macOS 12.2

Posted on May 8, 2022 3:42 AM

Reply
Question marked as Top-ranking reply

Posted on May 23, 2022 2:36 AM

Ok, now for the details.

In my proposed solution:


1) I will use Automator to er... automate the steps in converting the pdf to png images, and then recreate a pdf from these images. It only takes two Automator actions.

1a) In Automator, create a new "Quick Action"

1b) Set it to receive PDF files in any application

1c) Add a "Render PDF Pages as Images" action, and choose png format, and an appropriate resolution

1d) Add the dual action, "New PDF from Images" and choose a location to save the new file



You can now use this straight from the Finder if you want, by control-clicking any pdf and choosing Quick Actions->Flatten PDF



2) Once we have any application or Workflow or script that receives PDF files, you can add it to the PDF menu in the Print dialog, very easily. All you have to do is put an alias to it in ~/Library/PDF Services


So In Finder,

2a) press Command-Shift-G and paste ~/Library/Services - that is where you find the Quick Action created above

2b) press Command-Shift-G and paste ~/Library/PDF Services - that is where you want an alias, in order to be able to use this from the Print dialog.

2c) Hold down Command and Option keys, and drag from 2a to 2b to create an alias


DONE.

Similar questions

15 replies
Question marked as Top-ranking reply

May 23, 2022 2:36 AM in response to Luis Sequeira1

Ok, now for the details.

In my proposed solution:


1) I will use Automator to er... automate the steps in converting the pdf to png images, and then recreate a pdf from these images. It only takes two Automator actions.

1a) In Automator, create a new "Quick Action"

1b) Set it to receive PDF files in any application

1c) Add a "Render PDF Pages as Images" action, and choose png format, and an appropriate resolution

1d) Add the dual action, "New PDF from Images" and choose a location to save the new file



You can now use this straight from the Finder if you want, by control-clicking any pdf and choosing Quick Actions->Flatten PDF



2) Once we have any application or Workflow or script that receives PDF files, you can add it to the PDF menu in the Print dialog, very easily. All you have to do is put an alias to it in ~/Library/PDF Services


So In Finder,

2a) press Command-Shift-G and paste ~/Library/Services - that is where you find the Quick Action created above

2b) press Command-Shift-G and paste ~/Library/PDF Services - that is where you want an alias, in order to be able to use this from the Print dialog.

2c) Hold down Command and Option keys, and drag from 2a to 2b to create an alias


DONE.

May 18, 2022 4:41 AM in response to Brandon_J_321

Hello,

thank you for your reply, I was following the same steps as mentioned in the link. When converting with Preview from "initial file" > PNG > PDF, I always use one file at a time. When I open the PNG file containing multiple pages, all pages are in the left sidebar, selecting all or just one and hit "Export as PDF" is showing same result, first page is replacing all pages.


I'm on the latest OS.

If I print without converting to PNG, the file is showing fine, but is editable in several programs, this is what I want to avoid.


After several testing I noticed that if I apply "Quartz Filter" at File > Export, any filter except "Create Generic PDFX-3 Document" will convert the file in PDF just fine and all pages are visible. The filter mentioned earlier is generating a file where first page is replacing all pages. The rest of the filters that are working will modify the text/images visibility and several elements can disappear if the contrast is not very good (for example a signature in pen, or other notes).

May 18, 2022 8:11 AM in response to dragos_2p

dragos_2p wrote:

Hello,
the reason i go with PNG first is to make the document look like a scan, going directly to PDF will make the file editable with layers and the signature, stamp or any added text will be subject to copy/paste in any editors like Adobe Illustrator.


Ok, so now I understand why you go through PNG.

I tried that and printed the multi-page PNG to PDF, and it all came out correctly.


There may a problem with the print driver you are using (yes, even when printing to pdf, a print driver is still involved).

I would try using a different printer driver - you could add a "dummy printer", like this:


You will see that there is no communication with the printer (of course); click Continue.

The when printing to pdf, choose this printer, ignore the warning and choose PDF->Save as PDF


May 9, 2022 7:30 AM in response to dragos_2p

Hello dragos_2p,


Thanks for participating in the Apple Support Communities.


As you're seeing this occur when trying to save from PNG to PDF to print, let's check to make sure all files are selected to see if that could be related to what is occurring. Check out the information below, which can also be found here: Convert image file types using Preview on Mac - Apple Support


Tip: To convert more than one image file at a time, open the files in one window, select them in that window’s sidebar, then follow the steps above.


If that isn't helpful in clearing this up, confirm that you're on the latest macOS version to see if an update is available. If you do see an update available, be sure you have a backup of information prior to installing. This resource has helpful information to back up and update macOS: Update macOS on Mac - Apple Support


If that isn't helpful, let us know if this occurs when you try to print directly from a PDF without converting to a PNG first.


Have a great dat!

Jun 6, 2022 3:47 AM in response to dragos_2p

The only significant difference that I can see is that in your case your workflow receives "documents" while mine receives "PDF files". Since the quick action starts off by splitting the pages of a pdf, it does not make sense for other types of documents.


So, try changing this:



to this:



Note that you can use the workflow in the Finder only for PDF files; but if done as I describe, it will also work in the Print dialog for any type of files (as the printing process will do the pdf under the hood).


Jul 6, 2022 11:59 AM in response to Luis Sequeira1

Hello, thank you for your help.

I set the automation process as you described and is working just fine. From doc > pdf > automator > pdf


I also noticed that with the latest update 12.4 the problem is not there anymore.


Having this process PDF > PNG > Print to PDF is useful in other situation as well, for example with a protected PDF, when is not possible to copy/paste or OCR directly, going through PNG will solve the problem.


I'm glad that this worked out at the end just fine, I will test and use automator for other purposes as well.


Regards,

Dragos

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.

Problem printing to PDF with multiple pages on Monterey

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