Copy link to clipboard
Copied
I have a pdf that has layers. I want to only have one of the layers visible then save so that the print shop can print in large format. When I save with only selected layer visible, the file still has all the layers showing. How do I fix this?
Copy link to clipboard
Copied
All layers have a default visibility value. It is these default values that determine the visibility on opening. On the layers panel, right click on a layer and select properties to set this value.
Copy link to clipboard
Copied
Set the "initState" property. However, this only work in Acrobat Pro.
var docOCGs = this.getOCGs();
for (var i=0; i < docOCGs.length; i++)
{
if (docOCGs[i].name == "Badge Tab")
{
docOCGs[i].state = !docOCGs[i].state;
docOCGs[i].initState = docOCGs[i].state;
}
}
For a strategy that work for Reader you'll need to store the state on the form. For example, in a hidden text field. Then a document level script can be used to setup the OCG states when the PDF is opened.
Copy link to clipboard
Copied
Hey I'm using buttons to show/hide multiple layers in Acrobat with javascript. How do I save a new PDF with my selection of layers showing? Every time I save a PDF the layers are back to hidden by default. Here's the javascript I use for my button action
var docOCGs = this.getOCGs();
for (var i=0; i < docOCGs.length; i++)
{
if (docOCGs[i].name == "Badge Tab")
{
docOCGs[i].state = !docOCGs[i].state;
}
}
Appreciate the help.
Copy link to clipboard
Copied
Set the "initState" property. However, this only work in Acrobat Pro.
var docOCGs = this.getOCGs();
for (var i=0; i < docOCGs.length; i++)
{
if (docOCGs[i].name == "Badge Tab")
{
docOCGs[i].state = !docOCGs[i].state;
docOCGs[i].initState = docOCGs[i].state;
}
}
For a strategy that work for Reader you'll need to store the state on the form. For example, in a hidden text field. Then a document level script can be used to setup the OCG states when the PDF is opened.
Copy link to clipboard
Copied
Thank you so much Thom! Works perfectly.
Copy link to clipboard
Copied
Hi, I get annoyed by this also. If you open the pdf in acrobat and deselect the layers you don't want to see, then save as a jpeg it should work and save only the layers you want to see. Then I print that in photoshop.
Copy link to clipboard
Copied
I feel like all these answers are wrong or partial. This wokred for me - 1. deselect the layers you want to hide. 2. Right cleck each layer and select properties. 3. for each option turn off all visibilty options and then save as a new file so you dont alter the original. Default State: OFF Initial State: Visibility - Never Visible, Print: Never Prints, Export: Never Export
Copy link to clipboard
Copied
I made a layer I wanted visible with Acrobat and flattened the layer. Saved it and open with Photoshop. Only the layer saved showed up.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now