1 ====================================
2 General aspects of plotting with PyX
3 ====================================
5 How do I generate multipage output?
6 ===================================
8 With versions 0.8 and higher it is possible to produce multipage output,
9 i.e. a Postscript or PDF file containing more than one page. In order to
10 achieve this, one creates pages by drawing on a canvas as usual and
11 appends them in the desired order to a document from which Postscript or
12 PDF output is produced. The following example serves as an illustration::
16 d = document.document()
19 c.text(0, 0, "page %i" % (i+1))
20 d.append(document.page(c, paperformat=document.paperformat.A4,
23 d.writePSfile("multipage")
25 Here, ``d`` is the document into which pages are inserted by means of the
26 ``append`` method. When converting from a canvas to a document page, the page
27 properties like the paperformat are specified. In the last line, output is
28 produced from document ``d``.