tags:

views:

84

answers:

3

In my application, I need to convert PDF docs to PCL5 generic files to send to FTP PCL capable printers. Printing to file would be a last resort, I would prefer a small-footprint command line tool or API that will do the job.

I've seen some mention of doing this on Linux using Ghostscript, but I've got no idea how to replicate this on windows.

Many thanks

+1  A: 

Ghostscript is available also for windows. You can test It with opening a command window and using the gswin32c command. You can build a shell script that send the "gswin32c" command with all the options needed.

This could help you find the right sequence of flag and otpions

microspino
Thanks, been there before but I could not find a windows - specific build. I'll download the latest and look inside the gzip file.Thanks again
Hein du Plessis
Sorry, I followed the wrong link - found the windows binary under the sourceforge releases.
Hein du Plessis
You da man. Thank you.Shall I push my luck and ask if you have idea where I can get a PCL5e Device driver?
Hein du Plessis
+1  A: 

It seems you are searching for a generic printer driver: maybe this hpijs-pcl5e could fit, or also you can try HPLIP

Hp universal could be another starting point.

OpenPrinting in general has a lot of material you can dig. I'm sorry but my knowledge about this subject arrive just here. :)

microspino
Thanks again, will check it out!
Hein du Plessis
Ok, I can't figure out how to register the ppd file as a usable device for Ghostscript.
Hein du Plessis
Create and register a devnode for your device.A way to do It is by using the rundll32 printui.dll command.
microspino
See rundll32 printui.dll,PrintUIEntry /?
microspino
No, don't use **any** specific PPD file. This will only put device specific options (suitable for a certain printer model into the output file, and later, once you want to print on your actutal device using FTP, your target printer may get confused and refuse the job. Rather call Ghostscript directly (without any PPD) and you'll get a generic PCL output. (I'll add an example command in an extra answer -- these comments are not suitable for this).
pipitas
+1  A: 

Here is an example command that would generate one color PCL/XL from three PDF input files in a single go:

gswin32c.exe ^
    -dBATCH ^
    -dNOPAUSE ^
    -dSAFER ^
    -sDEVICE=pxlcolor ^
    -sOutputFile=c:/path/to/my.pcl ^
    first.pdf ^
    2nd.pdf ^
    no3.pdf 

(use -sDEVICE=pxlmono if you want black+White PCL output only). If you know your target printer in advance, you'd probably want to use some other -sDEVICE=... param.

pipitas