Skip to main content
Participating Frequently
Jun 17, 2025 1:07 PM UTC
Answered

InDesign script Transparency Flattener

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;
Manan JoshiCorrect answer
Community Expert
Jun 17, 2025 1:36 PM UTC

Check out flattenerPreferences property on Spread.

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

-Manan

-Manan

2 replies

Manan JoshiCommunity ExpertCorrect answer
Community Expert
Jun 17, 2025 1:36 PM UTC

Check out flattenerPreferences property on Spread.

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

-Manan

Translate
-Manan
Participating Frequently
Jun 17, 2025 2:06 PM UTC

Thank you! This pointed me in the correct direction!

Translate