Skip to content

PDFSaveOptions

new PDFSaveOptions()

Options for saving a document as an Adobe PDF file, used with the Document.saveAs() method.

All properties are optional.


pDFSaveOptions.acrobatLayers

Optional. Create Acrobat® layers from top-level layers. Acrobat 6 only.

Default: false

Boolean


pDFSaveOptions.artboardRange

Optional. This is considered for multi-asset extraction, which specifies the artboard range. An empty string extracts all the artboards.

Default: empty string

String


pDFSaveOptions.bleedLink

Optional. Link 4 bleed values.

Default: true

Boolean


pDFSaveOptions.bleedOffsetRect

The bleed offset rectangle.

Array of 4 numbers


pDFSaveOptions.colorBars

Optional. Draw color bars.

Default: false

Boolean


pDFSaveOptions.colorCompression

Optional. The type of color bitmap compression used.

Default: CompressionQuality.None

CompressionQuality


pDFSaveOptions.colorConversionID

Optional. The PDF color conversion policy.

Default: ColorConversion.None

ColorConversion


pDFSaveOptions.colorDestinationID

Optional. The conversion target for color conversion.

Default: ColorDestination.None

ColorDestination


pDFSaveOptions.colorDownsampling

Optional. The color downsampling resolution in dots per inch (dpi). If 0, no downsampling is performed.

Default: 150.0

Number (double)


PDFSaveOptions.colorDownsamplingImageThreshold

Section titled “PDFSaveOptions.colorDownsamplingImageThreshold”

pDFSaveOptions.colorDownsamplingImageThreshold

Optional. Downsample if the image’s resolution is above this value.

Default: 225.0

Number (double)


pDFSaveOptions.colorDownsamplingMethod

Optional. How color bitmap images should be resampled.

Default: DownsampleMethod.NODOWNSAMPLE

DownsampleMethod


pDFSaveOptions.colorProfileID

Optional. The color profile to include.

Default: ColorProfile.None

ColorProfile


pDFSaveOptions.colorTileSize

Optional. Tile size when compressing with JPEG2000.

Default: 256

Number (long)


pDFSaveOptions.compatibility

Optional. The version of the Acrobat file format to create.

Default: PDFCompatibility.Acrobat5

PDFCompatibility


pDFSaveOptions.compressArt

Optional. If true, the line art and text should be compressed.

Default: true

Boolean


pDFSaveOptions.documentPassword

Optional. A password string to open the document.

Default: no string

String


pDFSaveOptions.enableAccess

Optional. If true, enable accessing 128-bit.

Default: true

Boolean


pDFSaveOptions.enableCopy

Optional. If true, enable copying of text 128-bit.

Default: true

Boolean


pDFSaveOptions.enableCopyAccess

Optional. If true, enable copying and accessing 40-bit.

Default: true

Boolean


pDFSaveOptions.enablePlainText

Optional. If true, enable plaintext metadata 128-bit. Available only for Acrobat 6.

Default: false

Boolean


pDFSaveOptions.flattenerOptions

Optional. The printing flattener options.

PrintFlattenerOptions


pDFSaveOptions.flattenerPreset

Optional. The transparency flattener preset name.

String.


pDFSaveOptions.fontSubsetThreshold

Optional. Include a subset of fonts when less than this percentage of characters is used in the document. Valid for Illustrator 9 file format.

Range: 0.0 to 100.0.

Default: 100.0

Number (double)


pDFSaveOptions.generateThumbnails

Optional. If true, thumbnail images are generated with the saved file.

Default: true

Boolean


pDFSaveOptions.grayscaleCompression

Optional. Quality of grayscale bitmap compression.

Default: CompressionQuality.None

CompressionQuality


pDFSaveOptions.grayscaleDownsampling

Optional. Downsampling resolution in dots per inch (dpi). If 0, no downsampling is performed.

Default: 150.0

Number (double)


PDFSaveOptions.grayscaleDownsamplingImageThreshold

Section titled “PDFSaveOptions.grayscaleDownsamplingImageThreshold”

pDFSaveOptions.grayscaleDownsamplingImageThreshold

Optional. Downsample if the image’s resolution is above this value.

Default: 225.0

Number (double)


PDFSaveOptions.grayscaleDownsamplingMethod

Section titled “PDFSaveOptions.grayscaleDownsamplingMethod”

pDFSaveOptions.grayscaleDownsamplingMethod

Optional. How grayscale bitmap images should be resampled

Default: DownSampleMethod.NODOWNSAMPLE

DownsampleMethod


pDFSaveOptions.grayscaleTileSize

Optional. Tile size when compressing with JPEG2000.

Default: 256

Number (long)


pDFSaveOptions.monochromeCompression

Optional. Type of monochrome bitmap compression used.

Default: MonochromeCompression.None

MonochromeCompression


pDFSaveOptions.monochromeDownsampling

Optional. Downsampling resolution in dots per inch (dpi). If 0, no downsampling is performed.

Default: 300

Number (double)


PDFSaveOptions.monochromeDownsamplingImageThreshold

Section titled “PDFSaveOptions.monochromeDownsamplingImageThreshold”

pDFSaveOptions.monochromeDownsamplingImageThreshold

Optional. Downsample if the image’s resolution is above this value.

Default: 450.0

Number (double)


PDFSaveOptions.monochromeDownsamplingMethod

Section titled “PDFSaveOptions.monochromeDownsamplingMethod”

pDFSaveOptions.monochromeDownsamplingMethod

Optional. How monochrome bitmap images should be resampled.

Default: DownSampleMethod.NODOWNSAMPLE

DownsampleMethod


pDFSaveOptions.offset

Optional. Custom offset in points for using the custom paper.

Default: 0.0

Number (double)


pDFSaveOptions.optimization

Optional. If true, the PDF document should be optimized for fast web viewing.

Default: false

Boolean


pDFSaveOptions.outputCondition

Optional. An optional comment to add to the PDF file, describing the intended printing condition.

Default: not included

String


pDFSaveOptions.outputConditionID

Optional. The name of a registered printing condition.

Default: not included

String


pDFSaveOptions.pageInformation

Optional. If true, raw page information.

Default: false

Boolean


pDFSaveOptions.pageMarksType

Optional. The page marks style.

Default: PageMarksType.Roman

PageMarksTypes


pDFSaveOptions.pDFAllowPrinting

Optional. PDF security printing permission.

Default: PDFPrintAllowedEnum.PRINT128HIGHRESOLUTION

PDFPrintAllowedEnum


pDFSaveOptions.pDFChangesAllowed

Optional. Security changes allowed.

Default: PDFChangeAllowedEnum.CHANGE128ANYCHANGES

PDFChangesAllowedEnum


pDFSaveOptions.pDFPreset

Optional. Name of PDF preset to use.

String


pDFSaveOptions.pDFXStandard

Optional. The PDF standard with which this document complies.

Default: PDFXStandard.PDFXNONE

PDFXStandard


pDFSaveOptions.pDFXStandardDescription

Optional. A description of the PDF standard from the selected preset.

String


pDFSaveOptions.permissionPassword

Optional. A password string to restrict editing security settings.

Default: no string

String


pDFSaveOptions.preserveEditability

Optional. If true, Illustrator editing capabilities should be preserved when saving the document.

Default: true

Boolean


pDFSaveOptions.printerResolution

Optional. Flattening printer resolution.

Default: 800.0

Number (double)


pDFSaveOptions.registrationMarks

Optional. If true, draw registration marks.

Default: false

Boolean


pDFSaveOptions.requireDocumentPassword

Optional. Require a password to open the document.

Default: false

Boolean


pDFSaveOptions.requirePermissionPassword

Optional. Use a password to restrict editing security settings.

Default: false

Boolean


pDFSaveOptions.trapped

Optional. If true, manual trapping has been prepared for the document.

Default: false

Boolean


pDFSaveOptions.trimMarks

Optional. Draw trim marks.

Default: false

Boolean


pDFSaveOptions.trimMarkWeight

Optional. The trim mark weight.

Default: PDFTrimMarkWeight.TRIMMARKWEIGHT0125

PDFTrimMarkWeight


pDFSaveOptions.typename

Optional. Read-only. The class name of the referenced object.

String


pDFSaveOptions.viewAfterSaving

Optional. View PDF after saving.

Default: false

Boolean


// Saves the current document as PDF to dest with specified options
// dest contains the full path and file name to save to
function saveFileToPDF(dest) {
var doc = app.activeDocument;
if (app.documents.length > 0) {
var saveName = new File(dest);
saveOpts = new PDFSaveOptions();
saveOpts.compatibility = PDFCompatibility.ACROBAT5;
saveOpts.generateThumbnails = true;
saveOpts.preserveEditability = true;
doc.saveAs(saveName, saveOpts);
}
}