Hi,
I need to print a PDF to a specific printer silently.
I'm at my wits end.
Can someone help?
Thank you,
Reinaldo.
*-------------------------------------------------------------------------------------------------------------------------------
function PrintPdf( cFile, cPrinter, nCopies )
Local cSumatra := getIniFilePath() + "SumatraPdf.exe"
local cCmd := cSumatra + ' -Print-to "' + ;
alltrim( StrToken( cPrinter, 1, "," ) ) + ;
'" -exit-on-print ' + cFile
DEFAULT nCopies := 1
TRY
if !file( cSumatra )
MsgStop( ...
else
winexec( cCmd, SW_HIDE )
endif
END
RETURN Nil
reinaldocrespo wrote:Apparently Adobe Reader itself can be used to print silently from the command line:
http://support.adobe.com/devsup/devsup.nsf/docs/52080.htm
I tried to test it, but found that it has many .dll dependencies making it awkward to distribute to all pc's at the customer's sites.
For i := 1 to nCopies
winexec( cCmd, SW_HIDE )
Next
James Bott wrote:Reinaldo,
I don't know how to do it with SumatraPDF, but pdfprint can do it.
http://www.verypdf.com/pdfprint/pdf-print-cmd.html
Regards,
James
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 22 guests