Drawings SDK Developer Guide > Working with .dwg Files > Working with Other File Formats > Exporting to Other Formats > Exporting to a PDF File > Export to PDF File Parameters and Flags > Export Layouts and Set Page Parameters for PDF
Export Layouts and Set Page Parameters for PDF

Each drawing has one or several layouts that represent model space or paper space. To export specified layouts to a PDF file, add the layout name in the specific array by calling the addLayout() method of the PDFExportParams class.

If the array of layouts is empty, only the active layout is exported. The page count of the output PDF file depends on the element count in this array.

The ability to set page parameters for the output PDF file depends on whether Zoom to Extents mode is switched on or off:

  • On — The whole drawing is exported (using its extents) and scaled to fit the output PDF page size. The user can set the page size and other page parameters directly.
  • Off — Page setup parameters are taken from the layout's properties and can be customized (for example, using a Page Setup dialog).

To get the array with names of exported layouts, use the layouts() method of the PDFExportParams class.

To set a new array of exported layouts, use the setLayouts() method of the PDFExportParams class.

See Also

Export to PDF Parameters and Flags

Export Several Drawings to one PDF File

Copyright © 2002 – 2021. Open Design Alliance. All rights reserved.