ConfigurationPremium
The Drawing library provides options for specifying the basic parameters of the generated PDF file.
-
paperSize
—Can be a paper format (for example,A4
), an array of two numbers (for example, the width and height of the paper), or"auto"
. By default,paperSize
is set to"auto"
which means that the paper size is just enough to accommodate the drawing.The available paper sizes are
A0-A10
,B0-B10
,C0-C10
,Executive
,Folio
,Legal
,Letter
,Tabloid
. If you specify numbers, the units of the specified numbers are treated as typographic points. A typographic point equals 1/72 of an inch. You can also use strings of the297mm
form. The supported units aremm
,cm
,in
, andpt
. -
margin
—Indicates the paper margins and has to be an object that containstop
,left
,right
, andbottom
numbers. The units of the specified numbers are treated as typographic points. By using strings, you can specify units. WhenpaperSize
is set to"auto"
, the dimensions are adjusted to include the margin. -
landscape
—Accepts Boolean values and defaults tofalse
. If set totrue
, the paper dimensions rotate to ensure that the width corresponds to the longer side of the output file.