Search code examples
printingresizegraphvizpostscript

Can I reduce a an 21 page postscript file to a 3 page postscript file?


I have a postscript file that is printed on 21 pages (it is a 3 x 7 page drawing).

Now, I'd like to scale the output by 1/3rd (or 1/9th...) so that the entire drawing is 1 page wide and 3 (=floor(7/3)) pages high.

Is there a possibility to achieve what I want?

I am on Windows, and have GhostView installed, if this information should influence the answer.

Also, the post script was created with dot/graphviz, maybe there is something in the *.dot file that I could change?

Any help is greatly appreciated.


Solution

  • The dot language has a graph attribute called size for specifying the maximum width and height of the output, in inches. If it's too big to fit in that space, it gets scaled down to fit.

    So I think to make it one page wide and three pages high, assuming the pages are portrait, you could set the size attribute's width to the width of a page in inches (if you're using American Letter size, I think that's 8 1/2 inches, or A4 is 8.3 inches), and the height 3 times the height of a page (or larger)

    Example (I think this works!)

    graph G {
        graph [size="1.0,1.5"]
        Foo -- Bar
        Bar -- Baz
    }