The Drawing library provides options for specifying the basic parameters of the generated PDF file.
paperSize—This option can be either a paper name, such as A4, an array of two numbers, such as paper width and height, or
"auto". By default, it is
"auto", which means the paper size will be just enough to fit the drawing. If numbers are specified, they are assumed to be in a typographic points unit. A point is 1/72 of an inch. Strings of the form
297mm" can also be used. The supported units are
pt. The available paper sizes are:
margin—This option indicates the paper margins. It must be an object containing
bottomnumbers which specify the paper margins. Again, if numbers are passed, they are assumed to be in points. By using strings you can specify units. When
"auto", the dimensions are adjusted to include the margin.
trueis specified, the paper dimensions will be rotated if needed, so that the width is the larger edge.
creator—These are the optional strings to be included in the PDF information dictionary.
Dateobject is optional and specifies the creation date of the document. The default value is the current date/time (
trueto enable support for multiple page output, which is explained in the next section.