Page 1 of 1

Delete layer in PDF

Posted: Tue Nov 19, 2013 1:04 pm
by lombert
Hi



Is there any way to delete unwanted layers in a pdf? I need the pdf continued to be layered so I can't flatten it.



And it will not help to make them invisible, I need to get them all gone.



I'll tried to find any way inside Pitstop but can't find any. I knew that pdfToolbox can do it, but I don't want to buy more software.



My workflow so far is this. Make an layout in Indesign. I need to have some special layers for our cutting machine. Then I use MadeToPrint and MadeForLayers to print out two pdf's with respective layers how is needed for one print-file and one cut-file. But in the cut-file I don't want the "graphics" for example and in the print-file I don't want the cut/grease and so on..



I have visible/invisible layers to make the right content to the right pdf. But Indesign puts all layers in both pdf, just visible/invisible.. And therefor I need to delete some layers.. :(



So any suggestions I'm happy to hear. We have Pitstop Server and Switch 11 with most modules.



Thanks

Thomas

Delete layer in PDF

Posted: Tue Nov 19, 2013 1:39 pm
by freddyp
Create an Action List with the following three actions:



Select objects inside layers by name

Remove selection

Remove empty layers



The parameters are self-explanatory.



Freddy

Delete layer in PDF

Posted: Tue Nov 19, 2013 1:57 pm
by lombert
Thanks Freddy



I'm looking but can't find "Select objects inside layers by name" and "Remove empty layers", in witch PitStop version are the in? I have 09 in my computer now and waiting on an update to 12.

Delete layer in PDF

Posted: Tue Nov 19, 2013 3:14 pm
by lombert
I started the demo of Pitstop12 and make the Action, and it didn't work just right. It stills has an "layer", it has just removed the name and it's visibility. :(



The PdfToolbox did remove the layer complete with no trace of it after..

Delete layer in PDF

Posted: Tue Nov 19, 2013 3:49 pm
by freddyp
For me it works just fine. Are you sure you used "Remove selection" and not "Remove selected objects from layer"? The latter will indeed remove the layer, but leave the objects.



This may sound weird, but that is because layers in PDF are weird. They are not really layers at all. The technical term is Optional Content Group (OCG). OCG's can behave like layers in DTP applications, where all the objects in the top layer are on top of all the objects in the bottom layer, but they do not have to. You can put any combination of objects into an OCG, you can even put the same object in more than one "layer". Removing layers does not have any effect on the order of the objects in the file, you have to remove the objects themselves.



Freddy

Delete layer in PDF

Posted: Wed Nov 20, 2013 8:49 pm
by lombert
Freddy, you were right. I had use the wrong action. After changing it everything works as planed.



Thanks!



One more question. If I want to change all, I want to keep 3 layers and want to delete all other and I don't knew the name on. How would an action list look like then?

Delete layer in PDF

Posted: Fri Nov 22, 2013 1:01 pm
by freddyp
Select all the objects that are in the three layers you want to keep and then you inverse the selection:



Select objects inside layer by name

Select objects inside layer by name

Select objects inside layer by name

OR

OR

NOT

Remove selection

Delete layer in PDF

Posted: Fri Nov 22, 2013 5:57 pm
by dkelly
Apago PDF Enhancer can remove layers and their associated content also. Here's an example target setting to remove 3 language layers by name.



<pdfEnhancer>

<target version="3">

<layers>

<remove-by-name>French</remove-by-name>

<remove-by-name>German</remove-by-name>

<remove-by-name>Italian</remove-by-name>

</layers>

</target>

</pdfEnhancer>