PDFSaveOptions
PDFSaveOptions
Section titled “PDFSaveOptions”new PDFSaveOptions()
Description
Section titled “Description”Options for saving a document as an Adobe PDF file, used with the Document.saveAs() method.
All properties are optional.
Properties
Section titled “Properties”PDFSaveOptions.acrobatLayers
Section titled “PDFSaveOptions.acrobatLayers”pDFSaveOptions.acrobatLayers
Description
Section titled “Description”Optional. Create Acrobat® layers from top-level layers. Acrobat 6 only.
Default: false
Boolean
PDFSaveOptions.artboardRange
Section titled “PDFSaveOptions.artboardRange”pDFSaveOptions.artboardRange
Description
Section titled “Description”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
Section titled “PDFSaveOptions.bleedLink”pDFSaveOptions.bleedLink
Description
Section titled “Description”Optional. Link 4 bleed values.
Default: true
Boolean
PDFSaveOptions.bleedOffsetRect
Section titled “PDFSaveOptions.bleedOffsetRect”pDFSaveOptions.bleedOffsetRect
Description
Section titled “Description”The bleed offset rectangle.
Array of 4 numbers
PDFSaveOptions.colorBars
Section titled “PDFSaveOptions.colorBars”pDFSaveOptions.colorBars
Description
Section titled “Description”Optional. Draw color bars.
Default: false
Boolean
PDFSaveOptions.colorCompression
Section titled “PDFSaveOptions.colorCompression”pDFSaveOptions.colorCompression
Description
Section titled “Description”Optional. The type of color bitmap compression used.
Default: CompressionQuality.None
PDFSaveOptions.colorConversionID
Section titled “PDFSaveOptions.colorConversionID”pDFSaveOptions.colorConversionID
Description
Section titled “Description”Optional. The PDF color conversion policy.
Default: ColorConversion.None
PDFSaveOptions.colorDestinationID
Section titled “PDFSaveOptions.colorDestinationID”pDFSaveOptions.colorDestinationID
Description
Section titled “Description”Optional. The conversion target for color conversion.
Default: ColorDestination.None
PDFSaveOptions.colorDownsampling
Section titled “PDFSaveOptions.colorDownsampling”pDFSaveOptions.colorDownsampling
Description
Section titled “Description”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
Description
Section titled “Description”Optional. Downsample if the image’s resolution is above this value.
Default: 225.0
Number (double)
PDFSaveOptions.colorDownsamplingMethod
Section titled “PDFSaveOptions.colorDownsamplingMethod”pDFSaveOptions.colorDownsamplingMethod
Description
Section titled “Description”Optional. How color bitmap images should be resampled.
Default: DownsampleMethod.NODOWNSAMPLE
PDFSaveOptions.colorProfileID
Section titled “PDFSaveOptions.colorProfileID”pDFSaveOptions.colorProfileID
Description
Section titled “Description”Optional. The color profile to include.
Default: ColorProfile.None
PDFSaveOptions.colorTileSize
Section titled “PDFSaveOptions.colorTileSize”pDFSaveOptions.colorTileSize
Description
Section titled “Description”Optional. Tile size when compressing with JPEG2000.
Default: 256
Number (long)
PDFSaveOptions.compatibility
Section titled “PDFSaveOptions.compatibility”pDFSaveOptions.compatibility
Description
Section titled “Description”Optional. The version of the Acrobat file format to create.
Default: PDFCompatibility.Acrobat5
PDFSaveOptions.compressArt
Section titled “PDFSaveOptions.compressArt”pDFSaveOptions.compressArt
Description
Section titled “Description”Optional. If true
, the line art and text should be compressed.
Default: true
Boolean
PDFSaveOptions.documentPassword
Section titled “PDFSaveOptions.documentPassword”pDFSaveOptions.documentPassword
Description
Section titled “Description”Optional. A password string to open the document.
Default: no string
String
PDFSaveOptions.enableAccess
Section titled “PDFSaveOptions.enableAccess”pDFSaveOptions.enableAccess
Description
Section titled “Description”Optional. If true
, enable accessing 128-bit.
Default: true
Boolean
PDFSaveOptions.enableCopy
Section titled “PDFSaveOptions.enableCopy”pDFSaveOptions.enableCopy
Description
Section titled “Description”Optional. If true
, enable copying of text 128-bit.
Default: true
Boolean
PDFSaveOptions.enableCopyAccess
Section titled “PDFSaveOptions.enableCopyAccess”pDFSaveOptions.enableCopyAccess
Description
Section titled “Description”Optional. If true
, enable copying and accessing 40-bit.
Default: true
Boolean
PDFSaveOptions.enablePlainText
Section titled “PDFSaveOptions.enablePlainText”pDFSaveOptions.enablePlainText
Description
Section titled “Description”Optional. If true
, enable plaintext metadata 128-bit. Available only for Acrobat 6.
Default: false
Boolean
PDFSaveOptions.flattenerOptions
Section titled “PDFSaveOptions.flattenerOptions”pDFSaveOptions.flattenerOptions
Description
Section titled “Description”Optional. The printing flattener options.
PDFSaveOptions.flattenerPreset
Section titled “PDFSaveOptions.flattenerPreset”pDFSaveOptions.flattenerPreset
Description
Section titled “Description”Optional. The transparency flattener preset name.
String.
PDFSaveOptions.fontSubsetThreshold
Section titled “PDFSaveOptions.fontSubsetThreshold”pDFSaveOptions.fontSubsetThreshold
Description
Section titled “Description”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
Section titled “PDFSaveOptions.generateThumbnails”pDFSaveOptions.generateThumbnails
Description
Section titled “Description”Optional. If true
, thumbnail images are generated with the saved file.
Default: true
Boolean
PDFSaveOptions.grayscaleCompression
Section titled “PDFSaveOptions.grayscaleCompression”pDFSaveOptions.grayscaleCompression
Description
Section titled “Description”Optional. Quality of grayscale bitmap compression.
Default: CompressionQuality.None
PDFSaveOptions.grayscaleDownsampling
Section titled “PDFSaveOptions.grayscaleDownsampling”pDFSaveOptions.grayscaleDownsampling
Description
Section titled “Description”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
Description
Section titled “Description”Optional. Downsample if the image’s resolution is above this value.
Default: 225.0
Number (double)
PDFSaveOptions.grayscaleDownsamplingMethod
Section titled “PDFSaveOptions.grayscaleDownsamplingMethod”pDFSaveOptions.grayscaleDownsamplingMethod
Description
Section titled “Description”Optional. How grayscale bitmap images should be resampled
Default: DownSampleMethod.NODOWNSAMPLE
PDFSaveOptions.grayscaleTileSize
Section titled “PDFSaveOptions.grayscaleTileSize”pDFSaveOptions.grayscaleTileSize
Description
Section titled “Description”Optional. Tile size when compressing with JPEG2000.
Default: 256
Number (long)
PDFSaveOptions.monochromeCompression
Section titled “PDFSaveOptions.monochromeCompression”pDFSaveOptions.monochromeCompression
Description
Section titled “Description”Optional. Type of monochrome bitmap compression used.
Default: MonochromeCompression.None
PDFSaveOptions.monochromeDownsampling
Section titled “PDFSaveOptions.monochromeDownsampling”pDFSaveOptions.monochromeDownsampling
Description
Section titled “Description”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
Description
Section titled “Description”Optional. Downsample if the image’s resolution is above this value.
Default: 450.0
Number (double)
PDFSaveOptions.monochromeDownsamplingMethod
Section titled “PDFSaveOptions.monochromeDownsamplingMethod”pDFSaveOptions.monochromeDownsamplingMethod
Description
Section titled “Description”Optional. How monochrome bitmap images should be resampled.
Default: DownSampleMethod.NODOWNSAMPLE
PDFSaveOptions.offset
Section titled “PDFSaveOptions.offset”pDFSaveOptions.offset
Description
Section titled “Description”Optional. Custom offset in points for using the custom paper.
Default: 0.0
Number (double)
PDFSaveOptions.optimization
Section titled “PDFSaveOptions.optimization”pDFSaveOptions.optimization
Description
Section titled “Description”Optional. If true
, the PDF document should be optimized for fast web viewing.
Default: false
Boolean
PDFSaveOptions.outputCondition
Section titled “PDFSaveOptions.outputCondition”pDFSaveOptions.outputCondition
Description
Section titled “Description”Optional. An optional comment to add to the PDF file, describing the intended printing condition.
Default: not included
String
PDFSaveOptions.outputConditionID
Section titled “PDFSaveOptions.outputConditionID”pDFSaveOptions.outputConditionID
Description
Section titled “Description”Optional. The name of a registered printing condition.
Default: not included
String
PDFSaveOptions.pageInformation
Section titled “PDFSaveOptions.pageInformation”pDFSaveOptions.pageInformation
Description
Section titled “Description”Optional. If true
, raw page information.
Default: false
Boolean
PDFSaveOptions.pageMarksType
Section titled “PDFSaveOptions.pageMarksType”pDFSaveOptions.pageMarksType
Description
Section titled “Description”Optional. The page marks style.
Default: PageMarksType.Roman
PDFSaveOptions.pDFAllowPrinting
Section titled “PDFSaveOptions.pDFAllowPrinting”pDFSaveOptions.pDFAllowPrinting
Description
Section titled “Description”Optional. PDF security printing permission.
Default: PDFPrintAllowedEnum.PRINT128HIGHRESOLUTION
PDFSaveOptions.pDFChangesAllowed
Section titled “PDFSaveOptions.pDFChangesAllowed”pDFSaveOptions.pDFChangesAllowed
Description
Section titled “Description”Optional. Security changes allowed.
Default: PDFChangeAllowedEnum.CHANGE128ANYCHANGES
PDFSaveOptions.pDFPreset
Section titled “PDFSaveOptions.pDFPreset”pDFSaveOptions.pDFPreset
Description
Section titled “Description”Optional. Name of PDF preset to use.
String
PDFSaveOptions.pDFXStandard
Section titled “PDFSaveOptions.pDFXStandard”pDFSaveOptions.pDFXStandard
Description
Section titled “Description”Optional. The PDF standard with which this document complies.
Default: PDFXStandard.PDFXNONE
PDFSaveOptions.pDFXStandardDescription
Section titled “PDFSaveOptions.pDFXStandardDescription”pDFSaveOptions.pDFXStandardDescription
Description
Section titled “Description”Optional. A description of the PDF standard from the selected preset.
String
PDFSaveOptions.permissionPassword
Section titled “PDFSaveOptions.permissionPassword”pDFSaveOptions.permissionPassword
Description
Section titled “Description”Optional. A password string to restrict editing security settings.
Default: no string
String
PDFSaveOptions.preserveEditability
Section titled “PDFSaveOptions.preserveEditability”pDFSaveOptions.preserveEditability
Description
Section titled “Description”Optional. If true
, Illustrator editing capabilities should be preserved when saving the document.
Default: true
Boolean
PDFSaveOptions.printerResolution
Section titled “PDFSaveOptions.printerResolution”pDFSaveOptions.printerResolution
Description
Section titled “Description”Optional. Flattening printer resolution.
Default: 800.0
Number (double)
PDFSaveOptions.registrationMarks
Section titled “PDFSaveOptions.registrationMarks”pDFSaveOptions.registrationMarks
Description
Section titled “Description”Optional. If true
, draw registration marks.
Default: false
Boolean
PDFSaveOptions.requireDocumentPassword
Section titled “PDFSaveOptions.requireDocumentPassword”pDFSaveOptions.requireDocumentPassword
Description
Section titled “Description”Optional. Require a password to open the document.
Default: false
Boolean
PDFSaveOptions.requirePermissionPassword
Section titled “PDFSaveOptions.requirePermissionPassword”pDFSaveOptions.requirePermissionPassword
Description
Section titled “Description”Optional. Use a password to restrict editing security settings.
Default: false
Boolean
PDFSaveOptions.trapped
Section titled “PDFSaveOptions.trapped”pDFSaveOptions.trapped
Description
Section titled “Description”Optional. If true
, manual trapping has been prepared for the document.
Default: false
Boolean
PDFSaveOptions.trimMarks
Section titled “PDFSaveOptions.trimMarks”pDFSaveOptions.trimMarks
Description
Section titled “Description”Optional. Draw trim marks.
Default: false
Boolean
PDFSaveOptions.trimMarkWeight
Section titled “PDFSaveOptions.trimMarkWeight”pDFSaveOptions.trimMarkWeight
Description
Section titled “Description”Optional. The trim mark weight.
Default: PDFTrimMarkWeight.TRIMMARKWEIGHT0125
PDFSaveOptions.typename
Section titled “PDFSaveOptions.typename”pDFSaveOptions.typename
Description
Section titled “Description”Optional. Read-only. The class name of the referenced object.
String
PDFSaveOptions.viewAfterSaving
Section titled “PDFSaveOptions.viewAfterSaving”pDFSaveOptions.viewAfterSaving
Description
Section titled “Description”Optional. View PDF after saving.
Default: false
Boolean
Example
Section titled “Example”Saving to PDF format
Section titled “Saving to PDF format”// Saves the current document as PDF to dest with specified options// dest contains the full path and file name to save tofunction 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); }}