Layer mystery

Post Reply
User avatar
Terkelsen
Advanced member
Posts: 297
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Layer mystery

Post by Terkelsen »

I'm trying to make an action that will first create a new layer called "4-color" with all objects in it and then copy all images to a second layer called "Varnish".

My action looks like this:

Select all
Assign objects to layer with name (4-color)
Select images
Assign objects to layer with name (Varnish). (Making sure that "Remove from other layers" is unchecked.)

When I preview the result in Acrobat and hide the layer "Varnish", the images are hidden indicating that the images are in the layer Varnish and not in the layer 4-color.

If I hide the layer 4-color (but with the layer Varnish turned on) everything is hidden indicating that the images are in the 4-color layer but not in the Varnish layer.

Can anyone explain this peculiar behavior and is there any way to actually COPY the images to a new layer.
bens
Advanced member
Posts: 252
Joined: Thu Mar 03, 2011 10:13 am

Re: Layer mystery

Post by bens »

Layers in PDF are confusing if you think of them as layers. They are not layers as you would have in Photoshop for example. Photoshop layers are real layers: content that is above other content, hiding the underlying content or (with blend modes, transparency, etc.) interacting with it.

In PDF, layers are optional content. That's the official name in the spec, and I'll won't be using that other word anymore.

Optional content is just what the name implies: it is PDF content which is optional - and hence can be turned on or off. It is not conceptually above or underneath other content (at least not any more than all PDF content is). And, which is more relevant to your problem, objects can be part of many different optional content groups. After you Action List, the images will be in both the Varnish and 4-color optional content groups. Unfortunately the effect is not exactly what you want: if you disable the Varnish optional content, any object in that optional content group is hidden - even if it is also part of another optional content group. Vice versa, if you disable the 4-color optional content, that too hides all objects it contains, including the images which are also in the 4-color optional content.

You can see this in the PitStop Inspector if you go to Prepress - Layers, you should see a visibility expression like "4-color AND Varnish', meaning the object is only visible if both optional content groups are on. What you want is an OR instead. Unfortunately I don't think there's an automated way to do this with the current layer actions, or even manually with PitStop Pro (I might be missing something, if so someone will correct me).

You could actually copy the image, and put the new copy on a separate layer. This is a workaround, and may cause issues if the images have transparency or blend modes. The Action List would be something like this:

Select all
Assign objects to layer with name
Select images
Copy objects to clipboard
Select all
Paste objects from clipboard
Select last added objects
Assign objects to layer with name

The images will be duplicated, which is not ideal. But when saving only one copy will be saved, so it won't increase the file size too much. Still, they are technically separate images on the page.

The only other solution I see is to manually change the visibility expression with something like Enfocus Browser.
User avatar
Terkelsen
Advanced member
Posts: 297
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Re: Layer mystery

Post by Terkelsen »

Thanks a lot for the detailed explanation, bens. Your suggested action works just as I wanted it to.

I had already tried to use "Copy objects to clipboard", but couldn't figure out how to paste this into the new not yet existing layer. Pasting into the existing layer and then using "Select last added objects" solved that problem :)
Post Reply