EXPORT_PDF

The EXPORT_PDF command exports all currently loaded data to a PDF file. The following parameters are supported by the command.

  • FILENAME - full path to file to save the data to
  • EXPORT_LAYER - filename or description of layer(s) to export. By default all compatible and exportable layers are exported. You can include multiple EXPORT_LAYER parameters if you have multiple masks to search. Wildcards (* and ?) are supported. Hidden layers are not considered.
  • DPI - specifies the DPI that the file is generated at.
  • EXPORT_SCALE - specifies the scale to do the export at. For example to export at 1:50,000 scale, use EXPORT_SCALE=50000.
  • PDF_PAGE_SIZE - specifies the name of the paper size to use. This should match one of the entries on the PDF export dialog, like Letter, A0, etc. If you would like to define a custom page size, use a format like PDF_PAGE_SIZE="CUSTOM 12in x 18in" (creates a 12 inch wide by 18 inch tall page or PDF_PAGE_SIZE="CUSTOM 30cm X 60cm" which creates a 30 cm by 80 cm page.
  • PDF_PAGE_ORIENTATION - specifies the page orientation to use for the generated PDF file. The following values are supported:
    • AUTO - Automatically determine whether to use portrait or landscape mode based on export bounds aspect ratio.
    • PORTRAIT
    • LANDSCAPE
  • PDF_MARGINS - specifies the margins to use in inches. The value should be a comma-delimited list of numbers for the left, top, right, and bottom margins. For example, PDF_MARGINS="0.5,1.0,0.5,1.25" would result in a 0.5 inch margin for the left and right, 1.0 inch for the top, and 1.25 inches for the bottom.
  • PDF_HEADER - specifies the header to use
  • PDF_FOOTER - specifies the footer to use
  • PDF_COMBINE_RASTERS - specifies whether multiple raster layers should be combined into a single layer or kept separate. Use PDF_COMBINE_RASTERS=YES to combine them or PDF_COMBINE_RASTER_LAYERS=NO to keep separate.
  • PDF_FILL_PAGE - specifies whether the PDF export should fill the page or be cropped to the exact bounds specified. Use PDF_FILL_PAGE=YES to enable or PDF_FILL_PAGE=NO to disable.
  • PDF_FONT_SCALE - specifies the scale factor to apply to text. For example use PDF_FONT_SCALE=2.0 to double the size of text.
  • PDF_SYMBOL_SCALE - specifies the scale factor to apply to point symbols and icons. For example use PDF_SYMBOL_SCALE=2.0 to double the size of symbols.
  • LAYER_ATTR - specifies the attribute value to use from each feature for the layer name in the PDF file. The default is to use the feature description. See special Attribute Name parameter details for recognized values.
  • VECTOR_ONLY - specifies that only vector layers should be exported to the PDF file. Use VECTOR_ONLY=YES to enable.
  • SAVE_GRID_LINES - specifies that if grid line display is enabled that the grid lines should be saved. Specify SAVE_GRID_LINES=NO to disable this option. If it's not specified the grid lines will be saved if enabled.
  • SAVE_SCALE_AND_LEGEND - specifies that the distance scale and elevation legend, if applicable and enabled for display on the Configuration dialog, should be exported to the generated PDF file. Specify SAVE_SCALE_AND_LEGEND=NO to disable this option. If it's not specified the current view settings will be used.
  • PDF_USE_ADOBE_EXT - specifies that Adobe ISO 32000 Extensions should be used for georeference. Specify PDF_USE_ADOBE_EXT=YES to enable this option (default) or PDF_USE_ADOBE_EXT=NO to disable this option and use standard PDF georeferencing.
  • OVERWRITE_EXISTING - specifies that existing files should be overwritten. The default is OVERWRITE_EXISTING=YES, so use OVERWRITE_EXISTING=NO to skip exporting files that already exist.