Class TableOfContentsCreator

java.lang.Object
org.sejda.impl.sambox.component.TableOfContentsCreator

public class TableOfContentsCreator extends Object
Component creating a table of content
Author:
Andrea Vacondio
  • Constructor Details

    • TableOfContentsCreator

      public TableOfContentsCreator(MergeParameters params, org.sejda.sambox.pdmodel.PDDocument document)
  • Method Details

    • appendItem

      public void appendItem(String text, long pageNumber, org.sejda.sambox.pdmodel.PDPage page)
      Adds to the ToC the given text with the given annotation associated
      Parameters:
      text -
      pageNumber -
      page -
    • addToC

      public int addToC() throws TaskException
      Generates a ToC and prepend it to the given document
      Throws:
      TaskException - if there is an error generating the ToC
    • addToC

      public int addToC(int beforePageNumber) throws TaskException
      Generates a ToC and inserts it in the doc at before the given page number
      Throws:
      TaskException - if there is an error generating the ToC
    • hasToc

      public boolean hasToc()
    • shouldGenerateToC

      public boolean shouldGenerateToC()
    • pageSizeIfNotSet

      public void pageSizeIfNotSet(org.sejda.sambox.pdmodel.common.PDRectangle pageSize)
    • getFontSize

      public float getFontSize()