Skip to main content
Inspiring
December 15, 2022
Question

Export only visible layers

  • December 15, 2022
  • 3 replies
  • 1673 views

Hi, I create multilingual user manuals, I already have a script that from the book lets me select the layers of the book to make visible, but when I export the book it exports all the levels present in the files, it is possible to have a script that exports the book only with visible layers?
indesign's export settings don't allow it even if you flag only visible layers

thank you

This topic has been closed for replies.

3 replies

Mike Witherell
Community Expert
Community Expert
December 15, 2022

It is odd and unexpected logical behavior, tho, for InDesign to hide some layers, and then find them again buried in the exported PDF. There should be a choice switch for that in the PDF Export dialog box!

Mike Witherell
Community Expert
December 15, 2022

Hi @Samuel22307458169h ,

do you expect to see layers in your exported PDF?

And only the ones that are actually visible?

 

If yes, temporarily remove the invisible layers before Adobe PDF Export (Print).

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Inspiring
December 15, 2022

Hi @Laubender , when I have to export a book, I select the "visible layers only" setting but the final pdf also contains those that are not visible if I go to the layer menu in acrobat pro, even if they are hidden, I only need the layers that I leave visible from indesign , I temporarily solved it using the function remove hidden layers in the preflight for printing.
I'm no script expert, so I wouldn't know how to create one for my need

Community Expert
December 15, 2022

Hi @Samuel22307458169h ,

thank you for your solution! Sounds good.

So using Acrobat's Preflight function is the most effective way to go, I think.

 

If you want to implement a scripting solution with InDesign you need to save a document, remove the invisible layers temporarily, export to PDF and then close the document without saving.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Loic.Aigon
Legend
December 15, 2022

Did you check the "exportLayers" boolean propery of the pdfExportPreferences property of the application object?

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#PDFExportPreference.html#d1e324717

Note that you can set both different properties given that you want to export to interactive PDF or print PDF. The former link is worth for Printed PDFs. For interactive pdfs, you want to check the interactivePDFExportPreferences here:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#InteractivePDFExportPreference.html

 

HTH

Loic