Forum moved here!

Home / Command line fit to print is not working


I can print a PDF from the Sumatra app to a network printer. Prints correctly.

When I print from the command line, the margins are off and the top line on the page is clipped.

Here is the command line:
C:\Users\srich\AppData\Local\SumatraPDF\SumatraPDF.exe -print-to \nj-dc01\LAEM6011-BFC01 -print-settings “fit” “C:\Users\srich\Downloads\packing-list (6).pdf”

How to print from the command line just as the PDF is printed from the Sumatra windows app?

( I am windows 10, have the latest 64-bit version of Sumatra installed. )


CLI printing is blind based on default settings in Windows so either the printers defaults need to be adjusted by invoking Printing Dialog or pre-set outside SumatraPDF.

For that reason, the page may not come out as expected without some system “fettling”, there is auto rotate but no centring

There is only one printing override in settings.txt
PrinterDefaults [
PrintScale = shrink
and consider if that should be “fit” or “none” for your common usage.

Likewise experiment with shrink fit and noscale (note none is different word in CLI)
set paper according to choice and in most cases the result should “fall” into place

It is unusual for the first line to go AWOL that suggests aggressive printer gripper margins, not allowing images to overspill non printing margins.