Formating Contents |
Start page Previous page Next page |
This section describes options and parameters which you can use to adapt the "Formating and Layout of the Table of Contents", using text templates.
N2PDFVALUE_TOC_LEVEL1_PARAGRAPH_NAME N2PDFVALUE_TOC_LEVEL2_PARAGRAPH_NAME N2PDFVALUE_TOC_LEVEL3_PARAGRAPH_NAME ... ... N2PDFVALUE_TOC_LEVEL10_PARAGRAPH_NAME These parameters enable you to set individual settings for each respective level of the Table of Contents. These text templates have fixed, defined names.
Example - set "Verdana" font, font size "10" for the first level: Call N2PDFSetOption ( JobID, N2PDFOPTION_PARAGRAPH_FONT_NAME,_ "Verdana", N2PDFVALUE_TOC_LEVEL1_PARAGRAPH_NAME )
Call N2PDFSetOption ( JobID, N2PDFOPTION_PARAGRAPH_FONT_SIZE,_ "10", N2PDFVALUE_TOC_LEVEL1_PARAGRAPH_NAME )
N2PDFVALUE_TOC_HEADER_PARAGRAPH_NAME N2PDFVALUE_TOC_FOOTER_PARAGRAPH_NAME These parameters enable you to define the formatting of text appearing before and after the Table of Contents. This is a fixed, defined name for a text template.
Example - set "Verdana" font for the header in the Table of Contents: Call N2PDFSetOption ( JobID, N2PDFOPTION_PARAGRAPH_FONT_NAME,_ "Verdana", N2PDFVALUE_TOC_HEADER_PARAGRAPH_NAME )
N2PDFOPTION_TOC_TAB_NUMBER N2PDFOPTION_TOC_TAB_TEXT N2PDFOPTION_TOC_TAB_PAGENUMBER This parameter defines the position of the three columns of the table of contents. The values are the positions of
- the numerals, (N2PDFOPTION_TOC_TAB_NUMBER) - the chapter text and (N2PDFOPTION_TOC_TAB_TEXT) - the page number (N2PDFOPTION_TOC_TAB_PAGENUMBER)
You can use <OptionStr> to pass a value or you set the value to N2PDFVALUE_TOC_AUTOMATIC_TAB in order to automatically calculate the position (default setting). Any value assigned must be given in the units of measurement specified in "System Settings".
Example – Set interval to 3 cm: Call N2PDFSetOption ( JobID, N2PDFOPTION_TOC_Tab_Text, "3" , "" )
Example –Set interval to 3 cm but only level 1: Call N2PDFSetOption ( JobID, N2PDFOPTION_TOC_TAB_TEXT,_ "3" , N2PDFVALUE_TOC_LEVEL1_PARAGRAPH_NAME )
N2PDFOPTION_TOC_TABFILL_NUMBERN2PDFOPTION_TOC_TABFILL_TEXTWith these two parameters, you can enter a space market between the numbering, the chapter text and the page number. The default value will place blanks there. You may use one of the following values with <OptionString>:
Example: Dots between the chapter text and the page number CallN2PDFSetOption ( JobID, N2PDFOPTION_TOC_TABFILL_TEXT,_ N2PDFVALUE_TOC_TABFILL_DOTS, "" ) Example: Points between chapter text and page number only for level 1 CallN2PDFSetOption ( JobID, N2PDFOPTION_TOC_TABFILL_TEXT,_ N2PDFVALUE_TOC_TABFILL_DOTS, N2PDFVALUE_TOC_LEVEL1_PARAGRAPH_NAME )
N2PDFOPTION_TOC_TEXT_MAX_WIDTHUse this parameter to set the maximum width of the chapter text in the TOC. The entry is in the unit of measure set with N2PDFOPTION_SYSTEM_METRICS_MODE. If this option is activated, the chapter texts can be multiline and the entries are also included in the table of contents in multiple lines.
Example: Max. width of 5 cm Call N2PDFSetOption ( JobID, N2PDFOPTION_TOC_TEXT_MAX_WIDTH, "5", "" )
N2PDFOPTION_TOC_MAX_NUMBERING_LEVEL The maximum depth of view for the table of contents can be set with this parameter. It is then possible e.g. that only the main chapters (e.g. 1., 2., etc.) appear in the table of contents, even if further sublevels (e.g. 1.1, 1.2 etc.) are present in the main text. The interval between chapter number and text is then adapted automatically once a maximum depth for the Table of Contents has been set.
Example: Output only the first-level chapters in the table of contents Call N2PDFSetOption ( JobID, N2PDFOPTION_TOC_MAX_NUMBERING_LEVEL, "1", "" )
|