Page 1 of 1

Split PDF layers

Posted: Mon Jun 15, 2020 10:38 am
by PdFUser5000
Hi

I've been trying to use this app for pitstop. https://www.enfocus.com/en/appstore/pro ... pdf-layers

I'm having difficulities inserting " Always keep these layers variables". How should the syntax look like? Is there anywhere i can find info on it?
I can't get layer names(or ocg) from the Switch metadata section. Do i have to use acrobat getOCG in the variables editor?

Alnother question about the same app: Is it possible to make new PDF-s with multiple predefined layers from one pdf?

Example:
My pdf has layers:
Info
Extra Layer 1
Extra Layer 2
Layer Outline 1
Layer Outline 2
Layer Outline 3
Layer Design 1
Layer Design 2
Layer Design 3

i need this pdf converted into 3 different PDF-s, which have the following content:
PDF 1 :
Info
Layer Outline 1
Layer Design 1

PDF 2:
Info
Layer Outline 2
Layer Design 2

PDF3
Info
Layer Outline 3
Layer Design 3

Extra Layer 1 and 2 have to be removed (Always remove these layers by name if i can get the variables correct?)

Is this even possible? Or should i just split all layers > delete the unneccessary pdfs > Sort and merge the other ones?

I also have a script that makes the correct PDF-s straight from illustrator, but i just wanted to try if this could be done with split pdf layers.

If this should go under Switch applications, mods can move it there.

Re: Split PDF layers

Posted: Wed Jun 17, 2020 11:47 am
by freddyp
The syntax for specifying layer names is simply that you place one layer name on one line. If the layer name is fixed, you just type it. If the layer name is a variable you click on the button to open the variables dialog and it will get inserted on a line.

If you want to get the layer names from the PDF, run PitStop Server with a preflight profile that does not check anything but that does ask for layer output in the report (check the Layers box in the General tab, all the others can be unchecked). Choose XML as the report type and the output connection should be "Carry Data with Log" (this will attach the XML as a dataset to the PDF job).

Create a sample job by stopping the flow after the PitStop Server instance that attaches the XML report and in the variables dialog you can then browse to Metadata, Text, Build location path and in the "XML location path" you can use the following XPath:

Code: Select all

/EnfocusReport/LayerInfo/Layers/Layer[1]/LayerName
where 1 is the first layer, etc. Note that the first layer is the bottom one.

For my understanding, what do you mean with "mods can move it there"?

Re: Split PDF layers

Posted: Wed Jun 17, 2020 12:54 pm
by PdFUser5000
freddyp wrote: Wed Jun 17, 2020 11:47 am The syntax for specifying layer names is simply that you place one layer name on one line. If the layer name is fixed, you just type it. If the layer name is a variable you click on the button to open the variables dialog and it will get inserted on a line.

If you want to get the layer names from the PDF, run PitStop Server with a preflight profile that does not check anything but that does ask for layer output in the report (check the Layers box in the General tab, all the others can be unchecked). Choose XML as the report type and the output connection should be "Carry Data with Log" (this will attach the XML as a dataset to the PDF job).

Create a sample job by stopping the flow after the PitStop Server instance that attaches the XML report and in the variables dialog you can then browse to Metadata, Text, Build location path and in the "XML location path" you can use the following XPath:

Code: Select all

/EnfocusReport/LayerInfo/Layers/Layer[1]/LayerName
where 1 is the first layer, etc. Note that the first layer is the bottom one.

For my understanding, what do you mean with "mods can move it there"?
Thx, got it working!

But now if i want to get the following 3 pdf-s from the split PDFs, I have to sort the split pdf-s by name and then merge them together again?
I think i should make a variables set from the layer names and then someshow merge PDF-s based on the set, but it seems not doable, because the only thing that merges PDF-s is Merge PDF, and there is no way to use metadata there. I could sort all the pdfs based on names, but i would like to think that there's an easier way.

PDF 1 :
Info
Layer Outline 1
Layer Design 1

PDF 2:
Info
Layer Outline 2
Layer Design 2

PDF3
Info
Layer Outline 3
Layer Design 3



mods can move it there - if the question was in the wrong subforum, the moderators could move it.

Re: Split PDF layers

Posted: Thu Jun 18, 2020 10:53 am
by abailescollins
Do you want to merge them so each layer becomes a individual page, or overlay them so they are combined to make one page?
The overlay pdf action in PitStop 2020 might be useful if the latter.

Re: Split PDF layers

Posted: Thu Jun 18, 2020 1:04 pm
by PdFUser5000
abailescollins wrote: Thu Jun 18, 2020 10:53 am Do you want to merge them so each layer becomes a individual page, or overlay them so they are combined to make one page?
The overlay pdf action in PitStop 2020 might be useful if the latter.
Each PDF consists of X amount of pages(always the same). They have to be combined to one single pdf with the same x amount of pages with the layers stacked on top of eachother

Re: Split PDF layers

Posted: Thu Jun 18, 2020 3:00 pm
by abailescollins
Then for the stacking you will need overlay PDF.
We added that in 2020, it's an Action in PitStop Server, but they also made it an App for ease of use.
so you can get it from the Switch App Store
https://www.enfocus.com/en/appstore/product/overlay-pdf

This uses PitStop Server 2020 in the background.