Question
· Mar 13, 2018

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"
OPEN Dev:(/DATATYPE="TEXT"):80
USE Dev Write "Test printing",!
CLOSE Dev


Any suggestions on sending PDF to printer?

Discussion (3)0
Log in or sign up to continue

Hi Sabarinathan

I use pdfPrintCmd - see http://www.verypdf.com/app/pdf-print-cmd/index.html

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.

Peter