Pregunta

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.

¿Fue útil?

Solución

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

Otros consejos

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top