vb.net - Ghostscript - print multiple files at once -
vb.net - Ghostscript - print multiple files at once -
i using ghostscrip vb.net wrapper able print pdf files, without need install ghostscript exe on users' computers nor adobe.
it works good. problem need print many files , cannot stop default printer dialog popping each time when send file print.
i don't mind printer dialog coming because wish user can select printer print on can't figure out how can send multiple files printing in single command.
the purpose show printer dialog 1 time many files. code:
rungs("-q", "-dnopause", "-dnocancel", "-dbatch", "-dsafer", "-sdevice=mswinpr2", path)
rungs - wrapper function path variable filepath.
the ghostscript command line can take multiple input files. should work if modify rungs take optional number of path arguments , pass them through underlying gswin32c.exe command line.
i tested below command, printed 2 copies of file:
gswin32c -dbatch -dnopause -sdevice=mswinpr2 file.pdf file.pdf
i'm not sure rungs searched , found previous post here shared function interacts straight dll. if it's same function, seems pass args straight through ghostscript. seek adding multiple input files , should work if that's case.
example works me:
ghostscriptdlllib.rungs("-q", "-dnopause", "-dnocancel", "-dbatch", "-dsafer", "-sdevice=mswinpr2", "c:\testing\test1.pdf", "c:\testing\test2.pdf")
vb.net batch-file command ghostscript
Comments
Post a Comment