Global Font Replacements

Start page  Previous page  Next page

 

It will often be necessary to use global font types and sizes to give the PDF file a uniform appearance. A PDF created using n2pdf mostly consists of a series of Notes documents or RichText fields having fonts of different types  and sizes. n2pdf recognizes the global font replacement functionality in order to correct these different typefaces for the PDF.

 

N2pdf's text templates serve as the basis for attaining a uniform typeface. n2pdf uses the predefined text templates internally to do this.

 

N2PDFVALUE_GLOBAL_PARAGRAPH_NAME

 

If you want to activate global font replacement, you simply use the function N2PDFSetOption and set the respective values according using the principle of the text templates.

         

Example of global font type "Arial, 12pt":

Call N2PDFSetOption ( JobID, N2PDFOPTION_PARAGRAPH_FONT_NAME,_

"Arial",N2PDFVALUE_Global_PARAGRAPH_NAME )

 

Call N2PDFSetOption ( JobID, N2PDFOPTION_PARAGRAPH_FONT_SIZE,_

"12",N2PDFVALUE_Global_PARAGRAPH_NAME )

 

In addition to these global font replacement settings, you can also specify the areas where the replacement is to occur. The default applies the replacement to the entire PDF file area. You can of course exclude certain areas by applying the associated values. Below are the areas that you can activate or deactivate for global font replacement by setting the values N2PDFVALUE_TRUE and N2PDFVALUE_FALSE respectively.

 

N2PDFOPTION_GLOBAL_STYLE_BODY

Global replacement for main text on or off

N2PDFOPTION_GLOBAL_STYLE_HEADER

Global replacement for headers on or off

N2PDFOPTION_GLOBAL_STYLE_FOOTER

Global replacement for footers on or off

N2PDFOPTION_GLOBAL_STYLE_TOC

Global replacement for the table of contents on or off

 

 

Example for global replacement in the main text, but not in headers and footers:

Call N2PDFSetOption ( JobID,_

N2PDFOPTION_Global_STYLE_HEADER, N2PDFVALUE_False, "" )

 

Call N2PDFSetOption ( JobID,_

N2PDFOPTION_Global_STYLE_FOOTER, N2PDFVALUE_False, "" )

 

Call N2PDFSetOption ( JobID,_

N2PDFOPTION_Global_STYLE_TOC, N2PDFVALUE_True, "" )