landscap.ps 1.4 KB

1234567891011121314151617181920212223242526272829
  1. %!
  2. % landscap.ps
  3. % This file can be prepended to most PostScript pages to force
  4. % rotation to "landscape" mode.
  5. %
  6. % There are (at least) four possible ways to reasonably position a
  7. % page after rotation. Any of the four old corners (llx,lly e.g.)
  8. % can be moved to match the corresonding new corner.
  9. % By uncommmenting the appropriate line below (i.e., remove the
  10. % leading '%'), any such positioning can be chosen for positive or
  11. % negative rotation. The comments at the end of each "rotate" line
  12. % indicate the ORIGINAL corner to be aligned. For example, as given
  13. % below, the lower left hand corner is aligned. When viewed, this
  14. % corner will have moved to the urx,lly corner.
  15. %
  16. % James E. Burns, 3/8/93, burns@nova.bellcore.com
  17. %
  18. gsave clippath pathbbox grestore
  19. 4 dict begin
  20. /ury exch def /urx exch def /lly exch def /llx exch def
  21. %90 rotate llx neg ury neg translate % llx,ury
  22. 90 rotate llx neg llx urx sub lly sub translate % llx,lly
  23. %90 rotate ury lly sub urx sub ury neg translate % urx,ury
  24. %90 rotate ury lly sub urx sub llx urx sub lly sub translate % urx,lly
  25. %-90 rotate urx neg lly neg translate % urx,lly
  26. %-90 rotate urx neg urx llx sub ury sub translate % urx,ury
  27. %-90 rotate llx lly add ury sub urx llx sub ury sub translate % llx,ury
  28. %-90 rotate llx lly add ury sub lly neg translate % llx,lly
  29. end