EasyManua.ls Logo

Adobe 0046100128056 - InDesign - Mac - Exporting to PDF; Setting PDF Export Options

Adobe 0046100128056 - InDesign - Mac
209 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CHAPTER 3: Documents Exporting a Document as PDF 45
Exporting to PDF
The following script exports the current document as PDF, using the current PDF export options. (For the
complete script, see ExportPDF.)
app.activeDocument.exportFile(ExportFormat.pdfType, File("/c/myTestDocument.pdf"),
false);
The following script fragment shows how to export to PDF using a PDF export preset. (For the complete
script, see ExportPDFWithPreset.)
var myPDFExportPreset = app.pdfExportPresets.item("prepress");
app.activeDocument.exportFile(ExportFormat.pdfType, File("/c/myTestDocument.pdf"),
false, myPDFExportPreset);
Setting PDF export options
The following script sets the PDF export options before exporting. (For the complete script, see
ExportPDFWithOptions.)
with(app.pdfExportPreferences){
//Basic PDF output options.
pageRange = PageRange.allPages;
acrobatCompatibility = AcrobatCompatibility.acrobat6;
exportGuidesAndGrids = false;
exportLayers = false;
exportNonPrintingObjects = false;
exportReaderSpreads = false;
generateThumbnails = false;
try{
ignoreSpreadOverrides = false;
}
catch(e){}
includeBookmarks = true;
includeHyperlinks = true;
includeICCProfiles = true;
includeSlugWithPDF = false;
includeStructure = false;
interactiveElementsOption = InteractiveElementsOptions.doNotInclude;
//Setting subsetFontsBelow to zero disallows font subsetting;
//set subsetFontsBelow to some other value to use font subsetting.
subsetFontsBelow = 0;
//
//Bitmap compression/sampling/quality options.
colorBitmapCompression = BitmapCompression.zip;
colorBitmapQuality = CompressionQuality.eightBit;
colorBitmapSampling = Sampling.none;
//thresholdToCompressColor is not needed in this example.
//colorBitmapSamplingDPI is not needed when colorBitmapSampling
//is set to none.
grayscaleBitmapCompression = BitmapCompression.zip;
grayscaleBitmapQuality = CompressionQuality.eightBit;
grayscaleBitmapSampling = Sampling.none;
//thresholdToCompressGray is not needed in this example.
//grayscaleBitmapSamplingDPI is not needed when grayscaleBitmapSampling
//is set to none.
monochromeBitmapCompression = BitmapCompression.zip;
monochromeBitmapSampling = Sampling.none;

Table of Contents

Related product manuals