Forum moved here!

Home / Command line printing through web server



I am using Sumatra PDF for printing PDF files using command-line in web application. Its printing perfectly on the specified tray (LCF) in development machine, but when I hosted in the web server it is printing only on the bypass tray not on the specified tray.

sumatrapdf.exe -print-to “PRINTERNAME” -print-settings “bin=LCF” “FILENAME.PDF”`

LCF is the tray name.

I’d appreciate any assistance you may provide.

Thanks & regards


I have no experience of asp net thus can not say with full confidence that it should not make any difference how or where the command is made. However others have expressed issues in trying to run remotely.

The difference is most likely to be the difference in the way the print driver is installed and run on each machine, even if they were installed from the same binary source. So first off are they the same source driver ? are the platforms installed different e.g. admin user on dev machine but restricted rights on a different server architecture ? What is the system default setting on dev machine (default bin) versus default PRINTER settings for server (eco mode to preferred tray of a different printer etc.)


After a very long struggle, I found a solution and works for me, its only a permission issue. Another interesting thing is no need to kill the process after printing, it automatically kills the process from the process list. I have come across many software’s for command-line printing through nothing works for me but this works like a charm. Thanks for your reply and support.