Main Text

Start page  Previous page  Next page

 

The PDF file's main text (BODY) consists of a mixture of Notes RichText fields, entire Notes documents or the addition of plain text that can be configured using text templates. In addition, the table of contents is a component of the main text of a PDF file. A PDF file's main text can include variables, which can be replaced with other Rich text content or plain text while creating the PDF file. The main text of the PDF file is enclosed by the headers and footers. In addition, content from attachments (Import mode) may be loaded to the main text of the PDF files (see the description to "Attachments").

 

You can add new content to the PDF file's main text using the functions N2PDFAddContent or N2PDFAddRTContent and the constant

 

N2PDFVALUE_CONTENT_BODY

 

The content added this way is always inserted at the end of the main text. With the parameter <ContentOption> of the above-named function, you can specify if a page break is made before (N2PDFVALUE_PAGEBREAK_BEFORE) or after (N2PDFVALUE_PAGEBREAK_AFTER) the content, or if a new line should come before (N2PDFVALUE_CRLF_BEFORE) or after (N2PDFVALUE_CRLF_AFTER) the content.

 

<ContentOption>

Description

N2PDFVALUE_PAGEBREAK_AFTER

Adds a page break after the content.

N2PDFVALUE_PAGEBREAK_BEFORE

Adds a page break before the content.

N2PDFVALUE_CRLF_AFTER

Adds a line break after the content.

N2PDFVALUE_CRLF_BEFORE

Adds a line break before the content.

                 

 

 

Example for plain text in the body:

Call N2PDFAddContent ( JobID, N2PDFVALUE_CONTENT_BODY,_

N2PDFVALUE_CRLF_AFTER,"Plain text in the PDF" )

 

                 

Example for formatted text ( "Body" field in the database "db" and the document "doc"):

Call N2PDFAddRTContent ( JobID,_

N2PDFVALUE_CONTENT_BODY,_

N2PDFVALUE_PAGEBREAK_AFTER,_

db.Server,_

db.FilePath,_

doc.UniversalID,_

"Body")

 

The content of the main text or body, whether formatted (RichText) or unformatted (plain text), can include variables, which can later be replaced with the corresponding values in N2PDFProcess function (or ahead of time by using N2PDFSearchAndReplace). These variables must be assigned content using the functions N2PDFAddVariable or N2PDFAddRTVariable before running the N2PDFProcess.