Sumatra PDF is a PDF, ePub, MOBI, CHM, XPS, DjVu, CBZ, CBR reader for Windows

Command line print copies

I just can’t get multiple copies to print on the command line. I’ve tried

SumatraPDF.exe" -print-to “MyPrinter” -print-settings “2x” “MyPdf.pdf”
SumatraPDF.exe" -print-to “MyPrinter” -print-settings “x2” “MyPdf.pdf”
SumatraPDF.exe" -print-to “MyPrinter” -print-settings x2 “MyPdf.pdf”
SumatraPDF.exe" -print-to “MyPrinter” -print-settings 2x “MyPdf.pdf”

I only ever get 1 copy?

Should work however there are several factors to consider

Beware those " must be standard doubles (in UK that’s usually shifted 2)

Not all printers accept multiple copy outputs, this can usually be checked by manually selecting the printer with a single page and try to print 2 copies. Those that clearly will not are usually virtual printers such as those like Microsoft Fax/XPS/PDF produce only 1 page whereas a virtual printer like Ghostscript will print 2 sequential copies !!

So what is “MyPrinter” in real words?

There have been multiple drastic changes in Windows Printing every 4 months this year and on this windows 10 updated today, with current pre-release I get 2 blank pages rather than the 2 images I intended as a demo ! so need to dig deeper. (is it me?) another pc does not yet show that problem but is a version or two behind

Thank you. Very much real printers, with power sockets and everything! Various devices from known manufacturers. The script are test ones from simple windows notepad editor and using standard quotes. I even copied directly from the Sumatra example page.

Sadly I only even get one copy. But if I open in Sumatra abd manually print I can get multiple.

Again I cant prove the point on this machine due to win 10 issue (still checking if its just my pc) however the most basic test for SumatraPDF rather than the Printers Limits is to try sending one image as a page to printer as 2x pages.

Use a simple png or jpeg (not webp or heic) or a small 1 page PDF to avoid any memory issues

Mark
the following chunk is not your issue (you get 1 page) but for others may hint what may block 1st attempts at printing
Using 3.4.14215 (older than current 14221)
First message is Printer does not exist that’s Me error, I used wrong name of the printer
Second intent I use local “shared name” and get error Printer with given name does not exist, that’s windows insisting, For that network printer to add print server
Third I try “\\servername\Printer Name” and get Couldn't initialize printer (so I am closer as the print server seems to have responded)
So I pull up that printers preferences and try a test print it reports problems (so that’s the server I am currently suspicious of)

So let me use a different wi-fi network printer, success I can see the one page has been placed in to the printer spool queue, and a few minutes later 2 duplicate sheets of paper come out.

So beware there is no evidence 2x is sent to the printer but the physical printer accepted the 2x command. So for example a 7 page pdf I am printing will show as 7 pages whilst printing 7 to 1 in reverse twice. it finally reports 7/7 for the 14 pages collated in reverse in the output tray. (Note that simple printer does not have a stapler which is a known corporate problem setting e.g. should it have punched 2x7 or 1 x14)

That’s a tree and a half of todays carbon allowance used up.

Just updated that working install to 3.4.14221 just to test it can print with latest pre-release without known problems and that Windows 7 Pro is working well with todays version (only a newer apple ios heic image can not print)

So the file is a basic 1 page PDF <1Mb. I have an Xerox, Konica and HP printer and none print >1 page from any W10 pc.

I think we were chasing rainbows here in March and like others Print Nightmares in July, Its easy to blame Microsoft for shooting updates each month but I only have one Win 10 to test and that’s not printing or serving printers well at all

Ah well. I’ll just have to loop the print command but that has issues.

Mark whilst looking at a related issue I saw some related comments however you said its multiple printers but you never know?