Copy link to clipboard
Copied
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;
}
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...
Copy link to clipboard
Copied
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...
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
I'll try to help you when I get to my laptop.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Selection is the wrong word. I have a dialog that I choose a page from and it exports that page as a pdf.
Copy link to clipboard
Copied
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...
Copy link to clipboard
Copied
I knew I could count on this community! It works, thank you!