Text Format

Top  Previous  Next

 

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 however, 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_ADJUST_TABLE_WIDTH

This parameter allows you to define if tables are to be displayed in the width they were defined in or if n2pdf is to adapt the table width to the actual width of the page. If Notes contains a table with "fixed width", then the case may occur, that the sum of the width of all columns may be larger than the actual page width in the PDF. In this case, the table would be wider than the page. If you activate the option, then n2pdf will scale the table to fit the page. This may change the optical layout of the created PDF document.

 

N2PDFVALUE_TRUE

Fit table to page

N2PDFVALUE_FALSE

Do not fit table to page

 

Example:

Call N2PDFSetOption ( JobID,_

N2PDFOPTION_FORMAT_ADJUST_TABLE_WIDTH, N2PDFVALUE_True, "" )