Copy link to clipboard
Copied
How to automate the "Flatten Transparency option" in illustrator via javascript. Please share with me.
Thanks
Copy link to clipboard
Copied
It appears to be an output option, not something you can activate in an active file.
Copy link to clipboard
Copied
Larry, Thanks for your response. But my question was i need to apply the flatten transparency(object->flatten transparency) in illustrator active document file for a particular selected items like textframe and pathitems etc. Is it possible via scripting. Kindly share with me.
Thanks..
Copy link to clipboard
Copied
No, it is as I said an output option. There is no reson to do this until the file is outputted. Your only option is to do this by an action in Illustrator.
Copy link to clipboard
Copied
Have either of you found any other option? Larry, I understand what you're saying, but reading thru the documentation it appears that those output options are for older version of Illustrator. My understading thus far is that being able to Flatten Transparency is necessary to generate an AI file w/o transparency.
I was able to get this to work using GUI scripting along with a tool called cliclick. Has worked pretty well, but with Mavericks I'd like to see if I can abandon GUI scripting altogether.
Any advice would be greatly appreciated.
Copy link to clipboard
Copied
What's your purpose for generating an AI file without transparency? If you need an absolutely flat AI file, then save it as AI3 or 8. Neither of these version of AI will honor transparency. In the AI Save Options you would use flattenOutput and PreserveAppearance. Or save as a PDFX-1a which is also a flat file.
Copy link to clipboard
Copied
Does AI8 work with all Illustrator versions?
See: IllustratorSaveOptions in C# .NET is not working anymore as expected
Copy link to clipboard
Copied
if you have CS6 or newer you can try using menuCommands,
app.executeMenuCommand ('FlattenTransparency1');
let us know if it works, I don't have CS6 to try
Copy link to clipboard
Copied
I'm looking for the same thing.
app.executeMenuCommand('Flatten Transparency'); works in CC but all it does is it brings up the window and you still have to click OK to make the script continue.
Before anyone asks why do you want to do it etc. In print thereare instances where you have to open and edit (not text) large numbers of pdfs to change colours, outline fonts etc otherwise there's trouble on print devices.
My script for instance looks for 100K blacks and replaces them with rich black, looks for empty text frames, overprint, bleed settings, clipping paths etc.
The only way to edit successfully a pdf without fonts is to place it and flatten transparency outlining fonts and then work on it.
So back to the point. After the window pops up, is there a way to simulate a keystroke like "Enter" or maybe app.executeMenuCommand('Flatten Transparency'); takes arguments like:
app.executeMenuCommand('Flatten Transparency',preset_name);...?
Anyone? Adobe SDK team? š
Copy link to clipboard
Copied
Matt, did you ever resolve this?
@Larry, You need to be able to flatten transparency all the time in pre-press to handle missing fonts.
Copy link to clipboard
Copied
This is a really old post, but did anyone find a solution? I have the same problem with LaTeX math pdf generated by an illustrator script. This pdf is placed in the open illustrator document. To resolve font issues, I need to flatten transparency with outlined text.