Skip to main content
Robert at ID-Tasker
Legend
August 31, 2023
Answered

Structure of the Layers in the Linked PDF...

  • August 31, 2023
  • 3 replies
  • 606 views

Has it been changed recently??? In the last few months...

 

Before - I was able to use:

myLObj.GraphicLayerOptions.GraphicLayers.Count

to iterate through layers in the linked PDF - myLObj - which meant that GraphicLayers were DIRECTLY childrens of the GraphicLayerOption...

 

Now, it needs to be:

myLObj.GraphicLayerOptions.GraphicLayers.Item(1).GraphicLayers.Count

Which means that there is an extra Layer - name of the file - in the Layers structure??

 

At least in VB...

 

This topic has been closed for replies.
Correct answer Laubender

So are you saying that this behavior / structure is ONLY for PDFs? 

 

It's possible that in the past I have been testing only PSD files... 

 


@Laubender wrote:

Hi @Robert at ID-Tasker ,

Other PDFs would not that structure. Depending how the layers came into place, e.g. were directly added in Acrobat or other apps.


 

I think something is missing in the first sentence - "would not have"? 

 

And the 2nd sentence - so this sub nesting is ONLY when PDF has been exported from InDesign? 

 


Ah yes. "have" was missing. Corrected that.

And also yes, this specific structure with the name of the InDesiogn document is from InDesign exported PDFs.

It could be totally different with other PDFs that e.g. were edited with Acrobat Pro. It could be also different if someone edited a PDF exported from InDesign. E.g. by moving it through an automatic PDF workflow service for preparing PDFs for print…

 

Regards,
Uwe Laubender
( Adobe Community Expert )

3 replies

Community Expert
September 1, 2023

but all layers are then nested as sub layers - not at the "top".

 

Not sure I understand this.

I have an indd with several layers and an image placed. Then when I export that indd and place the PDF in a new indd, the script line returns 1.

Robert at ID-Tasker
Legend
September 1, 2023

Exactly - please check my screenshot - PDF in the middle - "layer" name - 1st on the list - is the name of the placed PDF - and then laers are nested below.

 

Layers in the linked PSD - Image - last group on the screenshot - are exactly as in the linked PSD file.

 

Community Expert
September 1, 2023

In JavaScript this still (ID2023) works fine:

app.selection[0].graphics[0].graphicLayerOptions.graphicLayers.length

 

P.

Robert at ID-Tasker
Legend
September 1, 2023

But what number do you get - when your original INDD file had few layers before exporting to PDF?

 

I'm not talking it won't work - but it WILL return "1" for the 1st level layer with the "name" of the PDF file - but all layers are then nested as sub layers - not at the "top".

 

 

Robert at ID-Tasker
Legend
August 31, 2023

Is it some kind of preparation / unification for the situation when Layers in PSD can be grouped into (sub)folders?

 

InDesign doesn't support Layer Groups ... for now? Is it a planned feature?