Forum moved here!

Home / Many PDF files, single print dialog - is it possible?

Waldek

Is it possible to call SumatraPDF from command line to print few PDF files, but show print dialog only once?

When I’m calling SumatraPDF with “-print-dialog -exit-when-done filePath1.pdf filePath2.pdf” arguments it shows print dialog for every file.

Thanks for help.

GitHubRulesOK

@Waldek

  1. I do not think it is possible to avoid more than one dialog as the logic is you may want to change settings for each one. The only way round this would be to first temporarily merge all pdfs into one then print that one.

  2. The alternative is to specify the -print-to on the command line and apply common -print-settings for all files, in this case the dialog is not visible for any one file but the settings “should” be applied for all documents, however if you are printing to file e.g. -print-to “Microsoft print to PDF” you will still get a filename dialog for each print.

  3. Hypothetically (you need to test this as I don’t have time at present)
    SumatraPDF code includes
    // the Print dialog allows access to the file system, so fall back
    // to printing the entire document without dialog if that isn’t desired
    bool showUI = HasPermission(Perm_DiskAccess);
    This should mean that if you set restrictions ini to DiskAccess=false
    the dialog will not appear at all, however this may not be what you want

  4. try a combination of 2 & 3