Hi,
I need to print a PDF to a specific printer silently.
I'm at my wits end.
Can someone help?
Thank you,
Reinaldo.
Hi,
I need to print a PDF to a specific printer silently.
I'm at my wits end.
Can someone help?
Thank you,
Reinaldo.
Reinaldo
Try sumatrapdf
http://blog.kowalczyk.info/software/sum ... nload.html
SumatraPDF -print-to-default -exit-on-print c:\MyPdfFile.PDF
SumatraPDF print-to-PRINTER_NAME -exit-on-print c:\MyPdfFile.PDF
HTH
Richard
*-------------------------------------------------------------------------------------------------------------------------------
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 Nilreinaldocrespo 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.
Enrico
There are otjer considerations with Adobe acrobat reader related to i'ts version
Silent print will not be usable on all acrobat versions and at least with a different code ... which makes it more complex
Sumatrapdf is just one exe , nothing else to distribute with...
PS : Doesn't work on win 98 or win ME
HTH
Richard
For i := 1 to nCopies
winexec( cCmd, SW_HIDE )
NextReinaldo,
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
Reinaldo
There is no available option for this in sumatrapdf
You can try setting the printer copies to xx whatever the number you want before printing with sumatrapdf, not tested but worth trying
HTH
Richard
It is a little complicated. These pdfs are stored on a blob field of an .adt table. Depending on certain other fields, the pdf should print x number of copies on n number of printers. For example, certain pdfs need to print 5 copies on a color printer xyz, 3 copies on printer acme, and 1 copy on printer n; while another pdf might only print 8 copies on printer n. This is done with at least 500 documents each day. So I need to be able to control the printer as well as the number of copies from source.
With sumatraPdf I've been able to print the pdfs on a specific printer and the output is faithful to the stored document, but the I've learned that sumatraPdf is a memory hog when it comes to printing. It eats all available memory bringing windows to a crawl. The bigger the pdf the longer the time it takes and the slower the computer becomes. So placing the instruction inside a loop only complicates matters exponentially.
I tried verypdf, but the printout is not quite as the original pdf. The margins as well as the aspect is a bit distorted. Not much, but enough not to be acceptable.
I'm thinking that perhaps there is a way to convert the PDF back to emf that can then be managed with tprinter?
Reinaldo.
Reinaldo,
>I tried verypdf, but the printout is not quite as the original pdf. The margins as well as the aspect is a bit distorted. Not much, but enough not to be acceptable.
verypdf has scaling options, perhaps you can correct for this. Also, have you contacted verypdf about the problem? Maybe they have a solution.
Regards,
James
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