Convert PCL to PDF
I'm developing an application where I need a FREEWARE utility to convert Printer Control Language(PCL) file to PDF. I searched the net but haven't yet found any freeware utility for this purpose. By the way, Is it possible to send a file directly to Acrobat PDF Writer printer driver through code. If yes, then that solves my problem. Can somebody help on this issue.
Thanks in advance
Yes, just change the printer to the Acrobat Driver and use the same code you use to print the report to any other printer. It will prompt you for a filename. I'm using sendkeys to automatically populate the filename, but it's a little messy (the box still pops up then goes away) and it doesn't always work if focus gets change to other applications during the process. I've search but not found any better way to assign the filename other than manually.
Thanks for ur reply. I was also thinking on the same lines as you but I have a problem
I wanted to know how can one use the VB Printer object to send any file (Doc or PCL or for that reason any file) to a Printer Device Driver and make it to print.
I tried to use Printer object to send the PCL file to Acrobat PDFWriter Printer driver, but Printer object doesn't contain any property which will take an input file and create PDF from it.
I know Acrobat PDFWriter creates a PDF from any file but how am I going to send the PCL file directly to PDFWriter through code.
I can set the Acrobat PDFWriter as the default printer, but how am I going to send the PCL file or any other file directly to this printer through code. Any help will be highly appreciated...
You can reference the Adobe Acrobat Distiller object, which requires the full version of Acrobat. Then you can forward any PostScript (or most PCL files) to the object.
take a look at the Acrobat SDK -
Adobe Acrobat 5 SDK
and some Adobe VB code samples for Distiller -
Adobe VB code samples
Point your attention to the DistillerCtrl
Thanks for the reply. I went to the Adobe site and got the DistillerCtrl code downloaded. But it isn't working with the PCL files that I have. It takes Postscripts(.ps) files only. Also it failed t convert certain postscripts file that I have. May be the tool converts only certain postscripts file. Is there any difference between Adobe Acrobat 4 and 5 versions. I converted a PCL file to PDF using ghostscripts and it opens up in Acrobat Reader 4 but in Acrobat Reader 5 it gives a draw error. I think there is a difference in which the both versions interpret PCL File.
If you have any suggesstion, you can surely pass it on to me.
How are the PCL files being created? If from your program, then just change the printer to the Acrobat driver.
Can you send me a couple of small sample PCL files? (zipped)
The previous message-poster was right, use a different printer driver to create the PS or PCL file...preferably the Distiller driver, most HP drivers will work.
Ghostscript can create PDF docs, but they won't always be 100% compatible with Adobe Acrobat Viewer (versions 4 or 5). An Adobe route is advised.
Again, please send some PS and PCL sample files, within your next reply.
Re: Convert PCL to PDF
Try this PCL to PDF converter , its a cloud API that uses many languages like java , .net etc to convert your PCL files to pdf you can selct the language you want.