Adobe 27510753 Scripting Guide - Page 179
Setting PDF export options, The following example sets the PDF export options before exporting
![]() |
UPC - 718659445294
View all Adobe 27510753 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 179 highlights
Adobe InDesign CS2 Scripting Guide Working with Documents in VBScript 171 Rem ShowingOptions: boolean (setting this option to true displays the PDF Export dialog box) Rem Using: PDF export preset (or a string that is the name of a PDF export preset) Rem The default PDF export preset names are surrounded by squar breackets (e.g., "[Screen]"). myInDesign.ActiveDocument.Export idExportFormat.idPDFType, "c:\myTestDocument.pdf", False, myInDesign.PDFExportPresets.Item("[Press]") Setting PDF export options The following example sets the PDF export options before exporting: Rem ExportPDFWithOptions.vbs Rem An InDesign CS2 VBScript Rem Sets PDF export options, then exports the active document as PDF. Set myInDesign = CreateObject("InDesign.Application.CS2") With myInDesign.PDFExportPreferences Rem Basic PDF output options. .PageRange = idPageRange.idAllPages .AcrobatCompatibility = idAcrobatCompatibility.idAcrobat6 .ExportGuidesAndGrids = False .ExportLayers = False .ExportNonprintingObjects = False .ExportReaderSpreads = False .GenerateThumbnails = False On Error Resume Next .IgnoreSpreadOverrides = False .IncludeICCProfiles = True On Error GoTo 0 .IncludeBookmarks = True .IncludeHyperlinks = True .IncludeSlugWithPDF = False .IncludeStructure = False .InteractiveElements = False Rem Setting subsetFontsBelow to zero disallows font subsetting Rem set subsetFontsBelow to some other value to use font subsetting. .SubsetFontsBelow = 0 Rem Bitmap compression/sampling/quality options (note the additional "s" in "compression"). .ColorBitmapCompression = idBitmapCompression.idZip .ColorBitmapQuality = idCompressionQuality.idEightBit .ColorBitmapSampling = idSampling.idNone Rem ThresholdToCompressColor is not needed in this example. Rem ColorBitmapSamplingDPI is not needed when ColorBitmapSampling is set to none. .GrayscaleBitmapCompression = idBitmapCompression.idZip .GrayscaleBitmapQuality = idCompressionQuality.idEightBit .GrayscaleBitmapSampling = idSampling.idNone Rem ThresholdToCompressGray is not needed in this example. Rem GrayscaleBitmapSamplingDPI is not needed when GrayscaleBitmapSampling is set to none. .MonochromeBitmapCompression = idBitmapCompression.idZip .MonochromeBitmapSampling = idSampling.idNone Rem ThresholdToCompressMonochrome is not needed in this example. Rem MonochromeBitmapSamplingDPI is not needed when MonochromeBitmapSampling is set to none. Rem Other compression options. .CompressionType = idPDFCompressionType.idCompressNone .CompressTextAndLineArt = True .ContentToEmbed = idPDFContentToEmbed.idEmbedAll .CropImagesToFrames = True .OptimizePDF = True Rem Printers marks and prepress options. Rem Get the bleed amounts from the document's bleed. .BleedBottom = myInDesign.ActiveDocument.DocumentPreferences.DocumentBleedBottomOffset .BleedTop = myInDesign.ActiveDocument.DocumentPreferences.DocumentBleedTopOffset .BleedInside = myInDesign.ActiveDocument.DocumentPreferences.DocumentBleedInsideOrLeftOffset .BleedOutside = myInDesign.ActiveDocument.DocumentPreferences.DocumentBleedOutsideOrRightOffset Rem If any bleed area is greater than zero, then export the bleed marks. If ((.BleedBottom = 0) And (.BleedTop = 0) And (.BleedInside = 0) And (.BleedOutside = 0)) Then .BleedMarks = True Else
![](/manual_guide/products/adobe-27510753-scripting-guide-5f6265c/179.png)