Newbie question re print dialog

#1

I have a program that is running in PERL It creates a PDF dynamically which I then propose to print out using Sumatra on a USB stick. Thus, it will (somehow) be executed as a command line. My question is about the print dialog.

I know there is the -print-dialog in command line options that WILL print the dialog, but is the converse also true; leaving out that instruction will NOT cause a dialogue to appear? (I want it all to run ‘silently’, ie no PDF read window popping up, no print dialogue, just the program calling the exe, and said print appearing at printer)

Incidentally, the script creates around one single page a minute, and currently opening the exe each time. I did wonder about the -reuse-instance option to load it once, but not sure if that option would REPLACE what’s in the reader each time.

So my current (proposed) code, called for each new PDF is:
sumatra.exe -print to default -print-settings fit -exit-when-done “path-to-PDF”

NB: I discovered a chatabout your prog about an hour ago on StackOverflow

#2

Just thought of something else.If the -reuse-instance is used, what is the command to print?Do you still call sumatra.exe, and then finds it has already opened itself?

#3

As a viewer SumatraPDF is not purposed as a print engine there are many printers that can read and process a pdf direct without needing a viewer application to feed them

ReuseInstance = is usually set to true (on by default) It should not generally affect printing it is mainly there for TeX typesetting editors while real time editing the same pdf pages repeatedly.

For many reasons such as memory etc one page at a time (minute) is better than spool many.

Command line printing is much better served by a dedicated application however SumatraPDF is useful in some simple cases because it is a single file with simple overheads and limited command set
The default given the printer name is to run “Semi-silent” (no dialog) but you can ask for the dialog or hide any error messages with -silent.

So for your test usage above I would not include -silent until its proven then add it later
There is no need for -reuse-instance nor -exit-when-done