Highlighted

How to create a TOC programmatically with FDK?

New Here ,
Jun 28, 2015

Copy link to clipboard

Copied

We need to create the Table Of Content programmatically for our customer with FDK. There is a Menu in Special>Table of Content.. in FM to do it, however we need to do the same with FDK API. Any help or hint are appreciate! Thank you

TOPICS
Scripting

Views

299

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

How to create a TOC programmatically with FDK?

New Here ,
Jun 28, 2015

Copy link to clipboard

Copied

We need to create the Table Of Content programmatically for our customer with FDK. There is a Menu in Special>Table of Content.. in FM to do it, however we need to do the same with FDK API. Any help or hint are appreciate! Thank you

TOPICS
Scripting

Views

300

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
Jun 28, 2015 0
Adobe Community Professional ,
Jun 29, 2015

Copy link to clipboard

Copied

Might have more luck if you looked in the FM Scripting forum ;>)

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
Reply
Loading...
Jun 29, 2015 0
Adobe Community Professional ,
Jun 29, 2015

Copy link to clipboard

Copied

The function to create a TOC is not exposed to the FDK or ExtendScript (or FrameScript). You have to basically use code to find the paragraphs you want, create a TOC document and make the appropriate entries in the TOC. It is not trivial by any means. If you have budget and want to explore this further, please contact me offlist and we can discuss it. Thanks. -Rick rick at frameexpert dot com

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
Reply
Loading...
Jun 29, 2015 0
Contributor ,
Jul 02, 2015

Copy link to clipboard

Copied

If I were doing this, I'd do the following:

  1. Check if the book already has a TOC. If not:
    • Copy a template file to the correct location in the filesystem
    • Add the TOC file into the book; see "Frame Book Architecture" in the FDK Programmer's Guide.
  2. Check that the TOC is correctly configured for which paragraphs to fetch etc. You do this by setting properties of the book component object.
  3. Start a generate/update using F_ApiUpdateBook() or F_ApiSimpleGenerate().

I'm sorry, but work commitments mean that I don't have time to do more than offer this outline.

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
Reply
Loading...
Jul 02, 2015 0