Question

how to set page size in the postscript? how to rotate the document to width? . .

%!
%% Example 1

newpath
100 200 moveto
200 250 lineto
100 300 lineto
2 setlinewidth
stroke

showpage

Thank you.

Était-ce utile?

La solution

To set the page size to A4 landscape use:

<< /PageSize [842 595] >> setpagedevice

before the first marking operator. Rotation is not needed.
Full PostScript reference is at http://www.adobe.com/products/postscript/pdfs/PLRM.pdf

Autres conseils

To switch to landscape format:

Move origin from lower left to lower right corner, then rotate the coordinate system 90 degrees.

595 0 translate % 595 is width of A4 paper in points
90 rotate
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top