Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

InDesign script can't seem to set the exported color conversion to NONE

Engaged ,
Apr 03, 2025 Apr 03, 2025

I have an in design script and part of it is to export selected images to PDF. I want to set the PDF output color conversion to none so there is no color conversion happening, but I can't seem to find the right code to make that work. does anybody know the proper way to do this?

with (app.pdfExportPreferences) {
    pageRange = pageNumber;
    acrobatCompatibility = AcrobatCompatibility.acrobat6;
    exportGuidesAndGrids = false;
    exportLayers = false;
    exportNonPrintingObjects = false;
    exportReaderSpreads = false;
    generateThumbnails = false;
    try { ignoreSpreadOverrides = false; } catch (e) {}
    includeBookmarks = false;
    includeHyperlinks = true;
    includeICCProfiles = false;
    includeSlugWithPDF = false;
    includeStructure = false;
    interactiveElementsOption = InteractiveElementsOptions.doNotInclude;
    subsetFontsBelow = 100;
    colorBitmapCompression = BitmapCompression.NONE;
    colorBitmapSampling = Sampling.BICUBIC_DOWNSAMPLE;
    colorBitmapSamplingDPI = 400;
    grayscaleBitmapCompression = BitmapCompression.NONE;
    grayscaleBitmapSampling = Sampling.BICUBIC_DOWNSAMPLE;
    grayscaleBitmapSamplingDPI = 400;
    monochromeBitmapCompression = BitmapCompression.NONE;
    monochromeBitmapSampling = Sampling.BICUBIC_DOWNSAMPLE;
    monochromeBitmapSamplingDPI = 1200;
    compressionType = PDFCompressionType.compressNone;
    compressTextAndLineArt = true;
    cropImagesToFrames = true;
    optimizePDF = true;

    colorConversion = PDFColorConversion.NONE; //How do i get this to work?
    //colorConversion = app.pdfExportPreferences.colorConversion.NONE;
    destinationProfile = "";
    //destinationProfile = "GRACoL2013_CRPC6"; // optional?
    includeICCProfiles = true; 
}
TOPICS
Scripting
134
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 03, 2025 Apr 03, 2025

I think it's this:

 

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

 

I've checked pretty much whole DOM 😉 and that's the only thing that makes sense...

 

Translate
Community Expert ,
Apr 03, 2025 Apr 03, 2025

Let me guess - ChatGPT failed again? 

 

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

 

There is no "colorConversion" property... Not in the whole InDesign's DOM...

 

ChatGPT is hallucinating again... 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 03, 2025 Apr 03, 2025

Yeah, I saw it https://developer.adobe.com/indesign/dom/api/p/PDFExportPreference/ but the fine folks on this forum have helped me out so many times I thought maybe, just maybe there would be a way. Thanks for you time. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2025 Apr 03, 2025

I'll try to help you when I get to my laptop. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2025 Apr 03, 2025

@davidn5918184 

 

Let's start from the fact - that you CAN'T export a SELECTION as PDF?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 03, 2025 Apr 03, 2025

Selection is the wrong word. I have a dialog that I choose a page from and it exports that page as a pdf.  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2025 Apr 03, 2025

I think it's this:

 

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

 

I've checked pretty much whole DOM 😉 and that's the only thing that makes sense...

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 03, 2025 Apr 03, 2025
LATEST

I knew I could count on this community! It works, thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines