Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ps2pdf bug? The pdf output is rotated relative to the ps output

I am having a bizarre problem in converting postscript to pdf using ps2pdf. Here is a minimal code snippet that causes the problem.

/Times findfont 40 scalefont setfont
-1 1 scale
15 15 moveto (R) show

This should show the letter, horizontally reflected. And when I view the postscript, that's what I see. But if I take the code above, save it as a file "bad.ps" and run the following command on it

ps2pdf bad.ps

I get a vertically reflected letter R.

I get the same problem with other fonts. BUT when I just draw lines, etc., the problem goes away. Any ideas?

like image 235
Nathan Reading Avatar asked Feb 17 '23 09:02

Nathan Reading


1 Answers

It sounds like the orientation of the PDF is rotated. By default, PS2PDF detects the orientation based on the dominant text orientation on the page. To override this behavior, use the

-dAutoRotatePages=/None

command line option. This option is described in more detail on the PS2PDF command line reference.

like image 168
Craig Lebakken Avatar answered Apr 27 '23 04:04

Craig Lebakken