ghostscript shifting PDF output upwards
I am running Red Hat Linux 7.3, LPRng, and GhostScript v6.52. When I use lpr to print a PDF file to an HP OfficeJet printer (configured to use the RAW driver), the document prints correctly. When I print the same document to an HP LaserJet printer (also configured as RAW), the document is mostly OK, but it is shifted slightly upwards (about 1/4 inch). This results in truncation of the topmost line (when it's not blank), so that only the very bottom of those characters can be seen and the line is unreadable. I get the same results with several PDF documents.
I think my "gs" command syntax is OK since the shifting doesn't occur on the OfficeJet printer (which BTW is an inkjet type printer). I think my LaserJet printer is defined properly in Linux since other types of files (eg: ASCII or PCL) print perfectly on it. I have experimented with different "gs" paper size specifications (letter, a4, legal), with no change in my results. Does anyone know why the shifting is occuring?
PS: I had not used Ghostscript until today. I only looked at it because I needed to find a way to directly print a PDF file in Linux without first invoking Acrobat Reader (i.e., I need to print in the background without any user intervention.)
This is the command I've been using:
echo quit | gs -sDEVICE=laserjet -q -dNOPAUSE -sPAPERSIZE=letter -sOutputFile=\|"lpr -Plp1" test.pdf
Any help would be greatly appreciated. Thank you.
- - - -
After posting the above, I tried printing the same documents via Acrobat Reader. I noticed that the Reader printouts were better centered on the page and used slightly smaller and less bold fonts than the Ghostscript printouts. So, even the good OfficeJet printouts, though not missing any text, are shifted upwards and to the right and use slightly bigger and bolder fonts than the Acrobat docs. I can live with that result, but not with the truncation to the LaserJet printer, which is shifted even more off course (but uses pretty much the same fonts as the OfficeJet). Unfortunately, I need this to work on many different models of HP LaserJet printers; the OfficeJet is only being used for testing.
Last edited by sshatz; 09-21-2004 at 02:34 PM.
|