Skip to content

ExportOptionsJPEG

exportOptionsJPEG

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.


exportOptionsJPEG.antiAliasing

If true, the exported image should be anti-aliased.

Default: true.

Boolean.


exportOptionsJPEG.artBoardClipping

If true, the exported image should be clipped to the art board.

Boolean.


exportOptionsJPEG.blurAmount

The amount of blur to apply to the exported image.

Range: 0.0 to 2.0.

Default: 0.0.

Number (double).


exportOptionsJPEG.horizontalScale

The horizontal scaling factor to apply to the exported image, where 100.0 is 100%.

Default: 100.0.

Number (double).


exportOptionsJPEG.matte

If true, the art board should be matted with a color.

Default: true.

Boolean.


exportOptionsJPEG.matteColor

The color to use when matting the art board.

Default: white.

RGBColor


exportOptionsJPEG.optimization

If true, the exported image should be optimized for web viewing.

Default: true.

Boolean.


exportOptionsJPEG.qualitySetting

The quality of the exported image.

Range: 0 to 100.

Default: 30.

Number (long).


exportOptionsJPEG.saveAsHTML

If true, the exported image should be saved with an accompanying HTML file.

Default: false.

Boolean.


exportOptionsJPEG.typename

The class name of the referenced object.

String; read-only.


exportOptionsJPEG.verticalScale

The vertical scaling factor to apply to the exported image.

Range: 0.0 to 776.19.

Default: 100.0.

Number (double)


// 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);
}
}