Question

I have a PDF, which I want to convert to PCL

I convert PDF to PCL using the following command: (gs 8.70)

    gswin32c.exe -q -dNOPAUSE -dBATCH \
       -sDEVICE=ljetplus -dDuplex=false -dTumble=false \
       -sPAPERSIZE=a4 -sOutputFile="d:\doc1.pcl" \
       -f"d:\doc1.pdf" -c -quit

When I view or print the output PCL, it is cropped. I would expect the output to start right at the edge of the paper (at least in the viewer).

Is there any to way get the whole output without moving the contents of the page away from the paper edge?

I tried the -dPDFFitpage option which works, but results in a scaled output.

Was it helpful?

Solution

You are using -sPAPERSIZE=a4. This causes the PCL to render for A4 sized media.

Very likely, your input PDF is made for a non-A4 size. That leaves you with 3 options:

  1. ...you either use that exact page size for the PCL too (which your printer possibly cannot handle),

  2. ...or you have to add -dPDFFitPage (as you tried, but didn't like),

  3. ...or you skip the -sPAPERSIZE=... parameter altogether (which most likely will automatically use the same as size as the PDF, and which your printer possibly cannot handle...)


Update 1:

In case ljetplus is not a hard requirement for your requested PCL format variant, you could try this:

gs  -sDEVICE=pxlmono   -o pxlmono.pcl   a4-fo.pdf
gs  -sDEVICE=pxlcolor  -o pxlcolor.pcl  a4-fo.pdf

Update 2:

I can confirm now that even the most recent version of Ghostscript (v9.06) cannot handle non-Letter page sizes for ljetplus output.

I'd regard this as a bug... but it could well be that it won't be fixed, even if reported at the GS bug tracker. However, the least that can be expected is that it will get documented as a known limitation for ljetplus output...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top