ExportOptionsJPEG
ExportOptionsJPEG
Section titled “ExportOptionsJPEG”exportOptionsJPEG
Description
Section titled “Description”Options for exporting a document as a JPEG file, used with the Document.exportFile() method. All properties are optional.
When you export a document, the appropriate file extension is appended automatically. You should not include any file extension in the file specification.
Properties
Section titled “Properties”ExportOptionsJPEG.antiAliasing
Section titled “ExportOptionsJPEG.antiAliasing”exportOptionsJPEG.antiAliasing
Description
Section titled “Description”If true
, the exported image should be anti-aliased.
Default: true
.
Boolean.
ExportOptionsJPEG.artBoardClipping
Section titled “ExportOptionsJPEG.artBoardClipping”exportOptionsJPEG.artBoardClipping
Description
Section titled “Description”If true
, the exported image should be clipped to the art board.
Boolean.
ExportOptionsJPEG.blurAmount
Section titled “ExportOptionsJPEG.blurAmount”exportOptionsJPEG.blurAmount
Description
Section titled “Description”The amount of blur to apply to the exported image.
Range: 0.0 to 2.0.
Default: 0.0.
Number (double).
ExportOptionsJPEG.horizontalScale
Section titled “ExportOptionsJPEG.horizontalScale”exportOptionsJPEG.horizontalScale
Description
Section titled “Description”The horizontal scaling factor to apply to the exported image, where 100.0 is 100%.
Default: 100.0.
Number (double).
ExportOptionsJPEG.matte
Section titled “ExportOptionsJPEG.matte”exportOptionsJPEG.matte
Description
Section titled “Description”If true
, the art board should be matted with a color.
Default: true
.
Boolean.
ExportOptionsJPEG.matteColor
Section titled “ExportOptionsJPEG.matteColor”exportOptionsJPEG.matteColor
Description
Section titled “Description”The color to use when matting the art board.
Default: white
.
ExportOptionsJPEG.optimization
Section titled “ExportOptionsJPEG.optimization”exportOptionsJPEG.optimization
Description
Section titled “Description”If true
, the exported image should be optimized for web viewing.
Default: true
.
Boolean.
ExportOptionsJPEG.qualitySetting
Section titled “ExportOptionsJPEG.qualitySetting”exportOptionsJPEG.qualitySetting
Description
Section titled “Description”The quality of the exported image.
Range: 0 to 100.
Default: 30.
Number (long).
ExportOptionsJPEG.saveAsHTML
Section titled “ExportOptionsJPEG.saveAsHTML”exportOptionsJPEG.saveAsHTML
Description
Section titled “Description”If true
, the exported image should be saved with an accompanying HTML file.
Default: false
.
Boolean.
ExportOptionsJPEG.typename
Section titled “ExportOptionsJPEG.typename”exportOptionsJPEG.typename
Description
Section titled “Description”The class name of the referenced object.
String; read-only.
ExportOptionsJPEG.verticalScale
Section titled “ExportOptionsJPEG.verticalScale”exportOptionsJPEG.verticalScale
Description
Section titled “Description”The vertical scaling factor to apply to the exported image.
Range: 0.0 to 776.19.
Default: 100.0.
Number (double)
Example
Section titled “Example”Exporting to JPEG format
Section titled “Exporting to JPEG format”// Exports current document to dest as a JPEG file with specified options,// dest contains the full path including the file name
function exportFileToJPEG(dest) { if (app.documents.length > 0) { var exportOptions = new ExportOptionsJPEG(); exportOptions.antiAliasing = false; exportOptions.qualitySetting = 70;
var type = ExportType.JPEG; var fileSpec = new File(dest);
app.activeDocument.exportFile(fileSpec, type, exportOptions); }}