View Categories

Adding Outline/Table of Content

1 min read

Adding Outline/Table of Content: #

If you want to add outline to the flipbooks you create you need to :

  1. Add id to the flipbook element. Example id="my_flipbook"
  2. Register a related option variable based on the id. Example var option_my_flipbook = {};

Code:

<div class="_df_book" 
     id="my_flipbook"
     source="http://www.yoursite.com/books/intro.pdf"> Intro Book</div>
<script>

var option_my_flipbook = {webgl:false};
    /**
     * outline is basically a array of json object as:
     * {title:"title to appear",dest:"url as string or page as number",items:[]}
     * items is the same process again array of json objects
     */
    option_my_flipbook.outline = [
      {title: "Page 1", dest: 1},
      {title: "Page 2", dest: 2},
      {
        title: "StackOverflow", dest: "https://stackoverflow.com/", items: [
        {title: "My Profile", dest: "https://stackoverflow.com/users/6687403/deepak-ghimire"},
        {title: "Page 4", dest: 4}
      ]
      }
    ];
</script>

Output:

Flipbook with Custom option

Outline is basically a array of json object as: {title:"title to appear",dest:"url as string or page as number",items:[]}
items is the same process again array of json objects



More Inquiry/Info & COMMENTS:

All DearFlip comments and discussion have been moved to
https://github.com/dearhive/dearflip-js-flipbook/discussions