Raster PDF File Format .PDF Export Automation Options

 

When the program is driven from an automation script, an options string can be specified in the script that acts as the export options dialogs do in the program. The string consists of comma-separated parameters, which specify the behavior of the various export options.

 

Parameter

Type

Description

Filter

string

PDFI

ColorDepth

 -32, -16, -8, 1, 4, 8, 24, 32

Specifies the color depth to use.

ColorDepth=-32 -- 32 bit greyscale output

ColorDepth=-16 -- 16 bit greyscale output

ColorDepth=-8  -- 8 bit greyscale output

ColorDepth=1 -- 1 bit color indexed output

ColorDepth=4   -- 4 bit color indexed output

ColorDepth=8   -- 8 bit color indexed output

ColorDepth=24  -- 24 bit true color output

ColorDepth=32  -- 32 bit true color with alpha output

ColorReductionMethod

1, 2, 3, 4, 5

Specifies the color reduction method to use.

ColorReductionMethod=1 -- Use the Ordered Dither color reduction method

ColorReductionMethod=2 -- Use the Diffused Dither color reduction method

ColorReductionMethod=3 -- Use the Popularity color reduction method

ColorReductionMethod=4 -- Use the MedianCut555 color reduction method

ColorReductionMethod=5 -- Use the MedianCut888 color reduction method

CompressImages

0 or 1

Compresses images in the PDF to reduce file size.

0 = False

1 = True

FitPage

0 or 1

Sets the size of the PDF to the application page size if True (1). Sets the PDF page size to the size of the exported objects if False (0).

HDPI

integer

Sets the number of horizontal pixels in the exported image that corresponds to a distance one horizontal inch.  Either a Width or an HDPI option may be specified, but not both.  The default HDPI is the resolution of the display device driver on your computer (this is 96 dots per inch on many Windows display devices, but number can very from device to device).

Height

integer

Sets the height of the exported image in pixels.  Either a Height or a VDPI option may be specified, but not both

KeepAspect

0 or 1

If this is set to 1, for any of the settings Height, Width, HDPI or VDPI you only need to set one option and Voxler will automatically calculate the other parameters in line with the aspect ratio of the input image.

KeepAspect=0 -- Do not retain the aspect ratio

KeepAspect=1 -- Do retain the aspect ratio

KeepPixelSize

0 or 1

Locks the pixel dimension width and height. Changes to the VDPI and HDPI will affect the document size, but not the pixel size, when this is set to 1. Changes to the VDPI and HDPI will affect the pixel dimensions, but not the document size, when this is set to 0. Note that the KeepPixelSize option is ignored if the either the Width or Height option is specified.

ModuleID

integer

Numeric ID of the module to be exported.

 

0=entire viewer window

2=default

VDPI

integer

Sets the number of vertical pixels in the exported image that corresponds to a distance of one vertical inch.  Either a Height or a VDPI option may be specified, but not both.  The default VDPI is the resolution of the display device driver on your computer (this is 96 dots per inch on many Windows display devices, but number can very from device to device)

Width

integer

Sets the width of the exported image in pixels.  Either a Width or an HDPI option may be specified, but not both.

 

Example

This example shows how to export an PDF file with the various options.

 

CommandApi.Construct("Export")

CommandApi.Option("GuiEnabled", "False")

CommandApi.Option("ClearOptions", "False")

CommandApi.Option("Filter", "pdf")

CommandApi.Option("Options", "HDPI=96; Height=418; VDPI=96; Width=576")

CommandApi.Option("Path", "C:/Path/To/Export/file.pdf")

CommandApi.Option("PersistOptions", "True")

CommandApi.Option("ModuleId", "0")

CommandApi.Do()

 

Used by: Export

 

 

See Also

Automation Model