Sending PDF to Printer using Cache - Windows

Hi All,

I need some help with sending PDF files to printer using cache instead of using third party tools(Adobe, foxit reader, etc..).
Sometime i getting access issue with the exe files.

Can able to send text data to printer using below code.

Set Dev="|PRN|PrinterName"
USE Dev Write "Test printing",!

Any suggestions on sending PDF to printer?

  • 0
  • 51
  • 1
  • 1


Hi Sabarinathan

I use pdfPrintCmd - see

it's not free but I have had no issues with it over many years of use

The idea is:
a. Write out the pdf to a directory
b. set xResult=$zf(-1, "print command exe")

The great advantage is that it has command line options that control margins, double sided etc etc

Also it can be run in the background - this is very useful when doing batches of pdf where creating the pdf using FOP can take several seconds - the idea is
a. scan the data via SQL
b. create the pdf
c. use printCmd to send to a printer
To give you an idea of it working I have a client that produces around 50 multi page passport a day - the printing takes around 1 hour - it's set going as a Cache background job and the printer just chugs away.


Hi Peter, Thanks for the response.

We also using an exe that worked for us till now. it prints whatever structure & format the pdf file having and also number of copies as the parameter. 
Worked good for a while. few days before this issue started and resolved on its own without any changes.

So due to this mess, i want to avoid third party .exe usages.

Relevant Articles