• Saving PDF with "embedded ICC profiles", doesn't work...
Hello -
I try to write up a script that will generate a PDF on the fly.
The PDF must embed the "ICC profile" and must have all images embedded.
The PDF is generated, but neither the "ICC profile" nor "images" are embed ![]()
Any idea why?
Here is a snippet of my code:
#target Illustrator
#targetengine main
app.activeDocument.selection = null; // Ensure there is nothing in the document selected already. This way you only get the selection you want.
app.redraw();
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
var myDoc = app.activeDocument;
var myLayers = myDoc.layers;
var PDF_HRpreset = "[Press Quality]";
var HighResOpts = new PDFSaveOptions(); // Create the PDFSaveOptions object to set the PDF options/properties
HighResOpts.embedICCProfile = true;
HighResOpts.pDFPreset = PDF_HRpreset;
//
// Embed ALL images (So we don't loose images' links when we open the PDF with Illustrator <- Client's late request)
//
if ( myDoc.length > 0 ) {
while ( app.activeDocument.placedItems.length > 0 ) {
placedArt = app.activeDocument.placedItems[0];
placedArt.embed();
}
}
myDoc.saveAs(File("~/Desktop" + "/" + myDoc.name.replace(".ai", "_MOCKUP.pdf")), lowResOpts);
Thank you for any help. Regards,
- Dimitri
Message was edited by: Vasily Hall
