How Do I Print Multiple PDF Pages on One Physical Page?

May I task you with another problem

Any pdf file I receive opens up with the version 11 of Adobe Reader

I then need to print the first four pages of this document only but print all four pages on one page. Clearly there is no macro fiction within Adobe to do this but can this be done with KM

This is why I am trying to achieve

Any ideas

Please try this:

Adobe Reader - Print with Preconfigured Settings.kmmacros (5.5 KB)


Note:

  • For the macro to work there must be a printable document open in Adobe Reader and the document must have at least 4 pages.

  • Tested with Adobe Reader 11. Compatible also with Adobe Acrobat Reader DC (minor modifications; see comments in the AppleScripts).

  • If the macro doesn’t work, open System Preferences > Security and Privacy > Privacy > Accessibility and make sure that “System Events.app” is checked (and perhaps also “Keyboard Maestro Engine”):


Edit:

Uploaded new screenshot and macro file:

  • AppleScript now has inline information for compatibility with Adobe Acrobat Reader DC.
  • Added test (with alert box) whether a printable document is open.
  • Set timeout of Pause Until action to 10 seconds.

@leehawa, I have moved your new question to a new topic (this one).
It is best to always start a new topic for a new subject.

Thanks.

My Hero again

It works

Is there anything you can’t do ?

Thanks

Lee

Dr. L. Hawa

Hi Tom

Since you are on a roll

I have what seems like a simple one

I want to do exactly the same thing but in a word document.

That is to print four pages onto one page. However I would like to use Microsoft Word’s own macro which when you think about it should work

. But it doesn’t

I am using the following version
[cid:EBE5EAD3-9F83-40A1-98E5-2FF1EAD86567@home]

And here is the macro which is generated within word but does not work

Sub PrintPages()
Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, _
Item:=wdPrintDocumentContent, Copies:=1, Pages:="1-4", _
PageType:=wdPrintAllPages, Collate:=True, Background:=False, _
PrintZoomColumn:=2, PrintZoomRow:=2
End Sub

What I am trying to do is the following:

[cid:24250BC3-D119-4386-AC62-0FF34C9F852F@home]

[cid:1B0558B6-088C-4241-B025-C39F4F4A1072@home]

I think the problem lies with the last line of code:

PrintZoomColumn:=2, PrintZoomRow:=2
We don’t know how to correct it

Any ideas

Thanking you in advance

Lee

Sorry, I’m not in the mood to look at MS-Word macro stuff :wink:

However, this little AppleScript will do what you want:

tell application "Microsoft Word"
  print first document with properties {starting page:1, ending page:4, pages across:2, pages down:2}
end tell

You can easily wrap it in a KM macro.

But, if you have to do it with Word macros, we have an MS-Office and VBA expert here on the forum, @JMichaelTX.

1 Like

Hi Tom

This kind of works.
If I just have up to four pages then it works but if I have say 12 pages , then it prints all 12 pages albeit 4 per page.

I want only the first four pages of any document to print.

Also I cannot find system events.app in accessibility or anywhere on the Mac

Any ideas

Thanks

Lee

If the system doesn't ask you to give accessibility permissions to it, then it should be fine. Otherwise you would see it in the Accessibility preferences with an unchecked checkbox.


This is – probably – because you have three sections where the pagination restarts with 1 at the beginning of each section. (See this Microsoft article.) Please check the pagination of your document to see if this is the case.

I made a test document with…

  • Section 1: page 1 to page 4
  • Section 2: page 1 to page 12

When I run the script on that document it prints page 1 thru page 4 of section 1, and page 1 thru page 4 of section 2 (= total 8 pages).

The same happens when I print via Word’s Print dialog. But: In the Print dialog I can set a custom page range. In that case the desired range is: p1s1-p4s1 (= page 1 of section 1 to page 4 of section 1)

>>> The problem is, I cannot find a possibility to set a custom print range p1s1-p4s1 in AppleScript.


I tried it then with a Word macro (the correct expression is Pages:="p1s1-p4s1") but I hit the same problem as you: “Named argument not found” for PrintZoomColumn and PrintZoomRow.

It seems, these arguments are not implemented with the Mac version of Word. Probably because the page layout is handled by the printer driver.


So, I’m afraid I can’t help you here. But, honestly, I have no clue of Microsoft Software, so there is a good chance that another forum member knows the obvious solution, for example @JMichaelTX or @ccstone.

If no solution can be found, we still have the possibility to automate it via UI scripting. But this should be the last resort.

Hey,
I also searching for the same information. I tried many processes to print multiple PDF pages. I have been using the canon printer and thought it will be possible for updating the printer driver and updated the driver but Canon Printer Error 5200 pop-up notification is shown on my system. I did not know so much about the canon printer. If anyone has any solution then suggest to me.

Did you try the solution provided above: