You want to write a report or a letter, or just need headers and footers in your text? Then we would like to show you how helpful n2pdf can be here for you.
Your headers and footers can consist of unformatted text or the content of a rich text field. For one n2pdf has to know that certain content is to be output as header or footer, for another this output can be defined to appear only on a certain page. All declarations have to be made upon the transfer of the content.
This definition is made via the functions for adding content - N2PDFAddContent for unformatted and N2PDFAddRTConent for formatted content. For this n2pdf makes use of constants.
Here a few examples of how transferring content from your database could look:
Display the content "All pages" on all pages in your document header.
Call N2PDFAddContent ( JobID, N2PDFVALUE_CONTENT_HEADER, N2PDFVALUE_HF_ALL_PAGES, "All pages" )
Display the content "All pages" on all pages in your document footer.
Call N2PDFAddContent ( JobID, N2PDFVALUE_CONTENT_FOOTER, N2PDFVALUE_HF_ALL_PAGES, "All pages" )
Display the content "Odd pages" on all pages in your document header.
Call N2PDFAddContent ( JobID, N2PDFVALUE_CONTENT_HEADER, N2PDFVALUE_HF_ODD_PAGES, "Odd pages" )
Based on the basic principle mentioned above you can now define any content as header or footer. Our internal constants provide a special service here, as they are a special kind of placeholder.
An example for the use of a placeholder (page numbering) in a rich text field:
Page [ACTPG] of [SUMPG]
Try all opportunities of n2pdf for yourself! For that SoftVision offers numerous support options - from a list of further placeholders, which you can find in the developer manual of n2pdf, to various options you can test for yourself in the sample database "n2pdf 3.2 - Header and Footer (R5)", which is provided with the installation.
Of course, our technical support is available anytime and free of charge.
... and now good luck with testing!