I have a script to generate Table Of content for a book.
In that I am creating TOCStyle with createBookmarks property set to False.
tocStyle.createBookmarks = False
And I have set PDFExportPreferences.IncludeBookmarks=True for Indesign application
Dim myInDesign = CreateObject(ConfigManager.GetConfigValue(ConfigKeys.IndesignVersion)) myInDesign.PDFExportPreferences.IncludeBookmarks = True
But still TOC entries are showing up as Bookmarks along with Required bookmarks in PDF
What can I do to disable display of TOC entries in bookmarks ?
I did not test this on the ExtendScript side of scripting.
Maybe the feature is broken?
What happens if you set the value to True ?
Hm. I hope, you address the right TOC Style in your document.
If you have a custom one like in your screenshot there are at least two TOC Styles in the document.
( ACP )
This feature doesn't work when you generate a TOC by script. 'Remove forced line break' doesn't work either. It's a monumental pain in the neck. Bug reports have been filed against this but nothing ever happened. It's been like this since CC.
Thank you Peter
just tried to add a new TOCStyle using ExtendScript where I set property createBookmarks to false.
That did not fail.
But what failed:
As soon as I added a new tocStyleEntry, createBookmarks of that TOCStyle was set to true.
So I thought it should be possible to change that after all tocStyleEntries were added. Just before I do createTOC() .
But unfortunately this also failed. Even when I set the value to false just before I did createTOC() the result was as if the createBookmarks was set to true.
The workaround I can see:
Before you do createTOC() label all existing bookmarks with a unique value.
After you created the TOC remove all bookmarks that are not labeled.
( ACP )
I tried removing the bookmarks which were created by TOC. It did work ,bookmarks are not showing up in bookmarks tab in pdf. But it also removed the link from Table of Content.When I click on contents of TOC it is not taking me to destination.
Make text anchor is still selected in TOCStyle.