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

How to create a TOC programmatically with FDK?

New Here ,
Jun 28, 2015 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

418

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 ,
Jun 29, 2015 Jun 29, 2015

Copy link to clipboard

Copied

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

Votes

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 ,
Jun 29, 2015 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

Votes

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
Contributor ,
Jul 02, 2015 Jul 02, 2015

Copy link to clipboard

Copied

LATEST

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.

Votes

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