-- AlexanderFedotov - 16-Sep-2010

pstops

Usage examples from fedotov@desy:inf/pstops .

Coordinate system and the order of operations

29.11.10

The man pstops says: "The shift, rotation, and scaling are performed in that order..." . This seems to be misleading.

I have just solved the enigma for the 100th time and again it took quite long.

My current understanding:

  • the order of operations is:
    1. scaling
    2. rotation
    3. shift
  • the cooordinate system:
    • origin : left bottom corner of the input page
    • x axis: horizontal , direction to the right
    • y axis: vertical, direction upwards

03.11.02 a 4-pages-block rearrangement of pages in a ps file

An example of a 4-pages-block rearrangement of pages in a ps file with the `pstops' utility, resulting in the "DESY-PRINT" pattern:

pstops '4:3L@.7(21cm,0)+0L@.7(21cm,14.85cm),2R@.7(0,14.85cm)+1R@.7(0,29.7cm)' in.ps out.ps

The pages in the block are numbered from 0 to 3, and we put them onto 2 pages as follows (for duplex printing):

        +-----------+     +-----------+ 
        |           |     |           | 
        |   0L      |     |    1R     | 
        |           |     |           | 
        |           |     |           | 
        |* * * * * *|     |* * * * * *| 
        |           |     |           | 
        |   3L      |     |    2R     | 
        |           |     |           | 
        |           |     |           | 
        +-----------+     +-----------+ 

18.03.04 2-pages-block arrangement of pages from A3 output of pdf2ps

An example of 2-pages-block arrangement of pages from output of pdf2ps program, the latter pages being in a portrait A3 (upper half being used)

pstops  -pa3 '2:0@.65(1.5cm,15cm)+1@.65(1.5cm,1cm)' a_pdf2ps_file.ps a_2pp.file

        +-----------+
        |           |
        |   0       |
        |           |
        |           |
        |* * * * * *|
        |           |
        |   1       |
        |           |
        |           |
        +-----------+

05.11.04 a ps -> 2pp ps conversion of a Blobel's pdf file

An example suited for a ps -> 2pp ps conversion of a Blobel's pdf file (converted to ps by ps2ps at don.itep.ru -- crashed on den):

pstops  -pa4 '2:0@.85(1.9cm,15cm)+1@.85(1.9cm,1cm)' a_pdf2ps_file.ps a_2pp.file

Same initial pdf file but initiallly converted with pdftops (`to' instead of `2'):

pstops  -pa4 '2:0@.85(1.4cm,10cm)+1@.85(1.4cm,-4cm)' a_pdftops.ps a.2pp.ps

05.11.04 an upper half of A4 pages (portrait) -> A4 landscape

A command that takes an upper half of A4 pages (portrait), rotates it left, scales by factor sqrt(2)=1.414 and puts again on A4 in landscape :

pstops  -pa4 '0@1.414L(42cm,0cm)' a.ps aa.ps

note: 42cm is the doubled width of A4 paper.

14.11.04 A4 landscape -> A4 portrait two pages per page

A command that takes A4 landscape, and puts to A4 portrait two pages per page (invented for half page latex, processed with the command from 05.11.04)

pstops  -pa4 '2:0R@.65(.8cm,29.3cm)+1R@.65(.8cm,14.65cm)'  a.ps a.2pp.ps

03.12.04 a version of "2 a4 landscapes -> portrait"

A version of the previous command "2 a4 landscapes -> portrait" with sizes tuned for ptt -> ps convertion with StarOffice5.2 :

pstops  -pa4 '2:0R@.74(.8cm,29.3cm)+1R@.74(.8cm,14.65cm)' a.ps a.2pp.ps

05.05.09 amplify a root manual 5.20

Commands to amplify a root manual 5.20 and move the page+section_title line from a horisontal bottom position to a vertical left position.

18% magnification for a chapter of the 5.21 version :

pstops '1:0@1.18(-2.8cm,-1.5cm)+0L@1.17(2.2cm,6.2cm)' 2GettingStarted.pdftops.ps a.ps

11% for a complete 5.20 version :

pstops '1:0@1.11(-1.8cm,-1.5cm)+0L@1.10(2.2cm,7.2cm)' tmp.ps a.ps
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2010-11-29 - AlexanderFedotov
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback