• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Export only visible layers

Explorer ,
Dec 15, 2022 Dec 15, 2022

Copy link to clipboard

Copied

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

TOPICS
Scripting

Views

140

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 15, 2022 Dec 15, 2022

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2022 Dec 15, 2022

Copy link to clipboard

Copied

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 )

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 15, 2022 Dec 15, 2022

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2022 Dec 15, 2022

Copy link to clipboard

Copied

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 )

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2022 Dec 15, 2022

Copy link to clipboard

Copied

Other options to remove hidden layers in Acrobat include saving as an optimized pdf and saving as PDF/X-1a (although you could also do that from InDesign).

Discard hidden layers.png

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2022 Dec 15, 2022

Copy link to clipboard

Copied

LATEST

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines