Skip to main content
Participant
April 10, 2008
Question

Problem in changing the Orientation of Post Script File

  • April 10, 2008
  • 3 replies
  • 835 views
Hi

I am trying to write a script which will take a post script file as a input and fire it to the printer.

I want to know some post script commands for the following. Please let me know that is it possible. And plz give me the post script commands.

if (def_orientation == landscape)
do nothing
else
change the orientation to landscape

Here plz tell me how to determine the default orientation of the post script file.

Thanks
amidiil
This topic has been closed for replies.

3 replies

_amidiil_Author
Participant
April 11, 2008
Hi Aandi Inston,

I don;t have much idea of post script commands and language. Can you please let me know what exactly I have to do here.
Participating Frequently
April 11, 2008
> Can you please let me know what exactly I have to do here.

I think you are looking for a magic bullet. There isn't one. This is a
serious project for a PostScript expert.

Aandi Inston
_amidiil_Author
Participant
April 11, 2008
we have post script file in portrait orientation. After giving some post script commands, can we change the orientation of that file to landscape.

If yes, what postscript commands will make this happen?
Participating Frequently
April 11, 2008
You can change the orientation of content on a page using rotate and
translate operators but that does not change the orientation of the
page, only the contents. You'd need to intercept all the page size
requests too, and add a default in case there wasn't one. You should
also update any DSC comments in case applications use them. Not a
project I'd fancy.

Aandi Inston
Participating Frequently
April 10, 2008
>Here plz tell me how to determine the default orientation of the post script file.

This is impossible in the general case. Printed pages usually do not
have an orientation; rather, some pages happen to have text running at
90 degrees. In such cases the user picks up the page and says "oh!
landscape". This is much harder for a computer, though it is not
impossible to trap all the text requests and evaluate the most
frequent text direction.

In lucky cases DSC comments (%% lines) give the information you seek.

Aandi Inston