I want to write an applescript that will extact the layer names from a PDF imported into InDesign. However, the only layer name it returns is the separator layer "Test.indd" and not the actual layers contained in the PDF.
The PDFs are saved from AI to include layers. Anyone have any suggestions on how to drill down into the serarator layer to get the other layer names?
You'll need to ask in the Acrobat forums most likely to find someone who understands how the layers are stored in the PDF. Not likely in this forum.
You could open the PDF in AI and get the names like this, which displays the names of a selected PDF's layers from AI—I don't think you can do it in Acrobat.
tell application "Adobe InDesign CS6"
set myPath to file path of item link of selection of active document as alias
tell application "Adobe Illustrator"
set myLayers to name of every layer of document 1
close document 1 saving no
set layerList to "Layers in current selection: " & return
--reverse loop gets the layers from the bottom up
repeat with i from number of items in myLayers to 1 by -1
set x to item i of myLayers
set layerList to layerList & x & ", "
display dialog layerList