0

I have a ghostscript command that I use that has been working for a while, and I recently had to increase the DPI to 600 instead of the default 300. This has caused it to push all pixels up to the line right after the previous line of pixels. Here's my example code:

gs -dSAFER -dBATCH -dNOPAUSE -q -sDEVICE=ljetplus -dMediaPosition=0 -r600 -sOutputFile=test.pcl lines.pdf quit.ps

Here's what lines.pdf looks like beforehand:lines.pdf

And here's what test.pcl looks like afterwards in GhostPCL: test.pcl

I have tried adding -c "<</PageOffset [0 -30]>> setpagedevice" to my command, but it ignores the y-axis changes I make. Why is it squishing everything to the top, and how do I stop it from doing that while keeping the 600 DPI?

  • I'd need to see the original PDF file to be able to comment. It may be that this is correct, because of the way the maths works out on drawing lines and the resolution. – KenS Jun 04 '19 at 14:45
  • Here's a link to it: https://drive.google.com/file/d/12m5OwpWqWhtXyUlphdqDjNWMbwX9fx5j/view?usp=sharing – TheLittlePeace Jun 05 '19 at 12:13
  • I've picked up the file, but I'm going to be away from my desk until next Moday, at a staff meeting, I'll look at it then. Unless someone else wants to have a go while I'm not here. – KenS Jun 05 '19 at 13:40
  • Just as an update, I am still looking for a solution to this. The only "solution" I can think of at the moment for it is to put a line across the side to "trick" ghostscript into thinking it's already pushed up. Nobody seems to be breathing down my neck about it yet, but the sooner I can find a better solution the better, since I would like to avoid adding extra fluff to my printouts. – TheLittlePeace Jun 17 '19 at 17:58
  • Whoops, sorry, this completely slipped my mind. Will look tomorrow – KenS Jun 17 '19 at 18:34
  • 1
    Well, this appears to be a bug in the PCL output code, in this case proabbly the ljetplus device. For me, I get all the lines drawn at the bottom of the page, and it doesn't matter what resolution I use when creating the PCL output file. If I use the pxlmono device then the result is correct. I'd suggest you open a bug report. – KenS Jun 17 '19 at 19:11
  • Okay, I'll probably do that. If you want to post as an answer I can accept it. Thank you! I'll probably go with my fluffed up printout solution above until a better solution is found/the bug is fixed. – TheLittlePeace Jun 18 '19 at 12:47

0 Answers0