How do I set page orientation with postscript when the resulting pdf is viewed in Adobe Acrobat?
I have a program that generates postscript then "prints" the script to a PDF file using gs.
The user can opt for the document to be in landscape format. The program handles this by using the adding the "90 rotate" command early in the script. This works with no problem. When the user opens the resulting PDF in Adobe Acrobat, it is displayed in landscape orientation.
Also, the user can optionally have a "watermark" added to the document which is text at a 60 degree angle. This is handled by issuing the "60 rotate", then the watermark text, then "-60 rotate". This also works with no problem. The resulting PDF file has watermark text at a 60 degree angle in relation to the rest of the text in the document.
The problem is when these two options are used together. The document is assembled correctly (in landscape orientation with a correctly angled watermark) but it is displayed in Acrobat in portrait requiring the user to rotate it to be able to read it. When I look at the postscript, it appears to be correct, merely the sum of the above two options:
90 rotate
... some stuff ...
60 rotate
... watermark text ...
-60 rotate
... the rest of the document ...
The "net rotation" is 90, leading me to believe that it would be displayed in landscape orientation but it is displayed in portrait.
There is no other page sizing declared in the script.
How can I get the document to display in landscape when opened in Acrobat? Thanks.
