Text Format

Start page  Previous page  Next page

 

The text format function allows the setting of general properties for text elements. This allows the control of text breaks in tables or paragraphs, for example.

The settings for the text format are set by using the option N2PDFSetOption. The following shows the individual options for the text format. The individual values are set via <OptionStr> and <SubOptionStr> of the N2PDFSetOption function.

 

 

N2PDFOPTION_FORMAT_DONT_BREAK_TABLES

This parameter allows you to set if tables may be broken by page breaks or if tables are always displayed completely on a page (provided a page is large enough to display a table). The parameter is set by using the value <OptionStr>.

 

N2PDFVALUE_TRUE

Tables will always be displayed completely on a page.

N2PDFVALUE_FALSE

Tables may be broken.

         

 

N2PDFOPTION_FORMAT_DONT_BREAK_TABLE_ROWS

This parameter allows you to set if table rows may be broken by page breaks or if table rows are always displayed completely on a page (provided a page is large enough to display a table row). The parameter is set by using the value <OptionStr>.

 

N2PDFVALUE_TRUE

Table rows will always be displayed completely on a page.

N2PDFVALUE_FALSE

Table rows may be broken.

 

 

N2PDFOPTION_FORMAT_IGNORE_KEEP

This parameter allows the definition, if the "keep paragraph on one page" option is to be ignored or if this text property is to be honored for the text formatting. The parameter is set by using the value <OptionStr>.

 

N2PDFVALUE_TRUE

The "keep paragraph on one page" property is ignored.

N2PDFVALUE_FALSE

The "keep paragraph on one page" property is honored.

 

 

N2PDFOPTION_FORMAT_IGNORE_KEEPN

This parameter allows the definition, if the "keep paragraph with next paragraph" option is to be ignored or if this text property is to be honored for the text formatting. The parameter is set by using the value <OptionStr>.

 

N2PDFVALUE_TRUE

The "keep paragraph with next paragraph" property is ignored.

N2PDFVALUE_FALSE

The "keep paragraph with next paragraph" property is honored.

 

 

N2PDFOPTION_FORMAT_AVOID_WIDOWS

This parameter allows you to define if a paragraph is to be pushed to a new page if only a single line of the paragraph will fit to the current page. The parameter is set by using the value <OptionStr>.

 

N2PDFVALUE_TRUE

A paragraph is moved to the next page, when only a single line will fit in on the current page.

N2PDFVALUE_FALSE

A paragraph is not moved to the next page, when only a single line will fit in on the current page.

 

 

N2PDFOPTION_FORMAT_AVOID_ORPHANS

This parameter allows you to define if an entire paragraph is to be pushed to a new page if only a single line of the paragraph would be displayed on a new page. The parameter is set by using the value <OptionStr>.

 

N2PDFVALUE_TRUE

A paragraph is moved to the next page completely, if only a single line would be shown on this new page otherwise.

N2PDFVALUE_FALSE

A paragraph is not moved to the next page completely, if only a single line would be shown on this new page otherwise.

         

 

N2PDFOPTION_FORMAT_REMOVE_TABLE_OFFSET

If a rich text field is passed to the PDF that is positioned in a table in the Notes form, then this field may contain a table offset. This means, i.e. when it is positioned in the second or third column of the table, there is a larger distance to the left margin of the page. This offset may be removed by using the function N2PDFSetOption with the parameter N2PDFOPTION_FORMAT_REMOVE_TABLE_OFFSET. This function will only work if a single rich text field is being exported. During the export of an entire Notes document, this option has no effect. The parameter is set by using the value <OptionStr>.

 

N2PDFVALUE_TRUE

Removes the table offset for a rich text field located in a table.

N2PDFVALUE_FALSE

Keeps the table offset for a rich text field located in a table.

 

Example:

Call N2PDFSetOption ( JobID,_

N2PDFOPTION_FORMAT_REMOVE_TABLE_OFFSET, N2PDFVALUE_True, "" )

 

N2PDFOPTION_FORMAT_DELETE_TRAILING_SPACE

This parameter allows you to avoid unwanted page breaks or empty pages at the end of a document. If this option is activated, n2pdf checks if an unnecessary page- or line break is found on the last page of a document. If this is the case and an empty last page is created, n2pdf deletes that unwanted, empty page.

 

N2PDFVALUE_TRUE

Removes empty pages at the end of the document

N2PDFVALUE_FALSE

Does not check for empty pages at the end of a document

 

Example:

Call N2PDFSetOption ( JobID,_

N2PDFOPTION_FORMAT_DELETE_TRAILING_SPACE, N2PDFVALUE_True, "" )

 

N2PDFOPTION_FORMAT_TABLE_WIDTH_MODE

Use this option to set the manner in which n2pdf should react if tables are encountered during conversion which are larger than the currently set paper format. If tables are wider than the currently defined paper format, then n2pdf can return an error message so that the tables concerned can be adapted manually, or the width of the entire document can be adapted to the table with the greatest width in the document, or the page width on the page concerned only can be adapted to the respective tables. A further parameter is used to make n2pdf adapt all tables to the defined page width.

 

 

N2PDFVALUE_FORMAT_TABLEWIDTH_NONE

No action (default)

N2PDFVALUE_FORMAT_TABLEWIDTH_ERROR

Output of an error message if table is wider than the current page format

N2PDFVALUE_FORMAT_TABLEWIDTH_ALLPAGES

All pages are adapted to the widest table in the document

N2PDFVALUE_FORMAT_TABLEWIDTH_ONEPAGE

Only adapt page width of the pages concerned to the width of the table

N2PDFVALUE_FORMAT_TABLEWIDTH_CONTENT

Adapt the table widths to the current page format

 

 

Example:

Call N2PDFSetOption ( JobID,_

N2PDFOPTION_FORMAT_TABLE_WIDTH_MODE, N2PDFVALUE_FORMAT_TABLEWIDTH_ALLPAGES, "" )