2.7.2 Class document

class document( pages=[])
Construct a document consisting of a given list of pages.

A document can be written to a file using one of the following methods:

writeEPSfile( file, *args, **kwargs)
Write a single page document to an EPS file, passing args and kwargs to the epswriter instance created for writing.

writePSfile( file, *args, **kwargs)
Write document to a PS file, passing args and kwargs to the pswriter instance created for writing.

writePDFfile( file, *args, **kwargs)
Write document to a PDF file, passing args and kwargs to the pdfwriter instance created for writing.

writetofile( filename, *args, **kwargs)
Determine the file type (EPS, PS, or PDF) from the file extension of filename and call the corresponding write method with the given arguments arg and kwargs.