Skip to main content
Participating Frequently
June 17, 2025
Answered

InDesign script Transparency Flattener

  • June 17, 2025
  • 1 reply
  • 208 views

I am creating a script that allows the user to export PDFs with the preset built into the script (this ensures users do not use the wrong preset, and bypasses exporting PDFs as background tasks). The issue I am having is with the transparency flattener setting. This is required for my PDFs, but I can not figure out how make the script set the flattener to HIGH.

Here are the settings in my code:

prefs.acrobatCompatibility = AcrobatCompatibility.ACROBAT_4;
prefs.transparencyFlattenerSettings = app.flattenerPresets.itemByName("[High Resolution]");
}

prefs.pageRange = PageRange.ALL_PAGES;
prefs.exportReaderSpreads = exportSpreads;
prefs.optimizePDF = true;

prefs.colorBitmapCompression = BitmapCompression.JPEG;
prefs.colorBitmapQuality = CompressionQuality.HIGH;
prefs.grayscaleBitmapCompression = BitmapCompression.JPEG;
prefs.grayscaleBitmapQuality = CompressionQuality.HIGH;
prefs.monochromeBitmapCompression = BitmapCompression.NONE;
prefs.compressTextAndLineArt = true;
prefs.cropImagesToFrames = true;

prefs.cropMarks = true;
prefs.bleedMarks = false;
prefs.colorBars = false;
prefs.pageInformationMarks = true;

prefs.useDocumentBleedWithPDF = false;

if (type === "Interior") {
prefs.bleedTop = 72; // 1.00"
prefs.bleedBottom = 18; // 0.25"
prefs.bleedInside = 18;
prefs.bleedOutside = 18;
Correct answer Manan Joshi

Check out flattenerPreferences property on Spread.

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Spread.html

-Manan

1 reply

Manan JoshiCommunity ExpertCorrect answer
Community Expert
June 17, 2025

Check out flattenerPreferences property on Spread.

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Spread.html

-Manan

-Manan
Participating Frequently
June 17, 2025

Thank you! This pointed me in the correct direction!