Skip to main content
This topic has been closed for replies.
Correct answer Bernd Alheit

View > Navigation Panels > Layers

4 replies

New Participant
August 31, 2016

Can this be scripted with javascript via a button trigger? I would like to flatten layers. You can do it from the panel easily and I would think you could do it from a button as you can "execute menu item" for most of the navigation.

try67
Adobe Expert
August 31, 2016

Yes, it can be done using the "Flatten Layers" Preflight Profile, like this:

var oProfile = Preflight.getProfileByName("Flatten Layers");

if (oProfile != undefined)

    this.preflight(oProfile);

February 9, 2017

try67-

I've added the above script to a button but had no luck.  I'm a newbie so I don't fully understand all of it.  Can you translate the script so that I can determine what modification I need to make?  I'm unsure of what oProfile means exactly and the .getProfileByName.  Is "Flatten Layers" the profile name that already exists in acrobat?

Thanks,

Jason

December 21, 2012

in Acrobat Pro XI I found the layers button finally, but it's greyed out-- I have a stamp and text boxes-- are they not layers? If not, how else to flatten without printing to pdf--or is that the only way, as cumbersome as it is?

Brainiac
December 21, 2012

They may or may not be on layers. Everything in a PDF can be on a layer potentially.

Confusingly, flattening in a PDF can be at least three different things. Flattening layers is really nothing but removing the names of layers. Then there is flattening transparency, and flattening comments.

Brainiac
April 12, 2012

No need to go anywhere near the menus - it's on the sidebar:

You can control which panels are available by right-clicking the sidebar.

Known Participant
December 12, 2012

Thank you for the clarification!

I agree with jrt-tn that the embedded help is lacking in visual clues.

April 12, 2012

Adobe Acrobat 9 Pro - I want to flatten or merge layers. The help says "Click the Layer Button". Well WHERE IS IT OR WHAT DOES IT LOOK LIKE??? I get so frustrated that the help says something like that and doesn't give any clue where it is or what it looks like. A search for Layer Button doesn't help either. I've been turning toolbars on and off and searching for an hour to try and find the elusive Layer Button. Frankly I think your help files are just horrible.

Bernd Alheit
Bernd AlheitCorrect answer
Adobe Expert
April 12, 2012

View > Navigation Panels > Layers