Print PDF files With PDFPrinterX and Ruby

Please, download and install Total PDF PrinterX. Using the sample code below you will be able to Print PDF files.

 

  Example Ruby:

require 'win32ole'
c = WIN32OLE.new('PDFPrinter.PDFPrinterX')

src="C:\\test\\test.pdf";
dest="Name Of Printer";

c.Print(src,dest, "-log c:\\test\\PDFPrinter.log");

if not File.exist?(dest)
  puts c.ErrorMessage
end

If you need examples on other languages please contact us. We will create any example specially for you.