RtfToPdfDocumentOptions Class

This class encapsulates the options to control the PDF document rendering process. The RtfToPdfConverter class defines a reference to an object of this type

Definition

Namespace: Winnovative.Pdf.Next
Assembly: Winnovative.Pdf.Next.RtfToPdf (in Winnovative.Pdf.Next.RtfToPdf.dll) Version: 21.0.3
C#
public class RtfToPdfDocumentOptions
Inheritance
Object    RtfToPdfDocumentOptions

Properties

AutoResizePdfPageHeight Automatically resize PDF page height to match content height. The default value is false
Bookmarks The bookmarks added to the outline of the generated document, after the bookmarks created from the headings of the RTF document. The page numbers refer to the pages of the generated document, including the pages of the table of contents and of the PDF documents added before the converted content, and the location in a page is given from the top left corner of the page
BottomMargin The rendered PDF document bottom margin in points. 1 point is 1/72 inch. This property is used only when UsePageSettingsFromRtf is set to false. By default the left margin is 0
EnableHeaderFooter Indicates whether internal capabilities will be used to generate the header and footer based on the HeaderTemplate and FooterTemplate properties. This provides basic support for adding HTML with page numbering in the header and footer. For more advanced options, use the PdfHtmlHeader and PdfHtmlFooter properties instead. The default value is false.
FitWideContentToPage True to scale down the content as much as needed to show entirely an element wider than the page, such as a table whose columns hold codes or addresses that cannot be broken between letters, which also makes the rest of the content smaller. Images are reduced to the width of the page and long words are wrapped on their own, so the option is normally not needed; it matters only for documents with content wider than the page. The default value is false
FooterTemplate The HTML template used for the PDF document footer. It should be valid HTML markup and may include the following CSS classes to inject dynamic values: date (formatted print date), title (document title), pageNumber (current page number) and totalPages (total number of pages). For example, <span class="title"></span> will render a span containing the document title. This template is used only if the EnableHeaderFooter property is true. For advanced scenarios, use the PdfHtmlFooter property. If null or empty, a default template will be applied.
GenerateDocumentOutline True to create an outline for the generated PDF document with a bookmark for each heading of the RTF document. The default is false
GenerateTableOfContents A flag indicating if a table of contents is automatically generated in the PDF document from headings. The default is false
HeaderTemplate The HTML template used for the PDF document header. It should be valid HTML markup and may include the following CSS classes to inject dynamic values: date (formatted print date), title (document title), pageNumber (current page number) and totalPages (total number of pages). For example, <span class="title"></span> will render a span containing the document title. This template is used only if the EnableHeaderFooter property is true. For advanced scenarios, use the PdfHtmlHeader property. If null or empty, a default template will be applied.
LeftMargin The rendered PDF document left margin in points. 1 point is 1/72 inch. This property is used only when UsePageSettingsFromRtf is set to false. By default the left margin is 0
OpenAction The action executed by the viewer when the generated document is opened: go to a page at a given location and zoom, go to a named destination, run JavaScript, a viewer action or open a web address. When null, the document has no open action. The default is null
PageNumberLimit The maximum number of PDF pages to generate from conversion. The default value is 0 and the entire RTF document will be converted to PDF
PdfHtmlFooter The generated PDF document footer based on a HTML template given by Html and HtmlBaseUrl properties or by the HtmlSourceUrl property
PdfHtmlHeader The generated PDF document header based on a HTML template given by Html and HtmlBaseUrl properties or by the HtmlSourceUrl property
PdfPageOrientation This property controls the orientation of the pages of the PDF document generated by the RTF to PDF converter. This property is used only when UsePageSettingsFromRtf is set to false. The default orientation is Portrait
PdfPageSize This property controls the page size of the PDF document generated by the RTF to PDF converter. This property is used only when UsePageSettingsFromRtf is set to false. The default page size is A4
PdfStandard The PDF standard the generated document conforms to. When a PDF/UA or a PDF/A standard that requires tagging is selected, the structure of the generated document follows the headings, paragraphs, tables, images and links of the converted document. The default is None
RightMargin The rendered PDF document right margin in points. 1 point is 1/72 inch. This property is used only when UsePageSettingsFromRtf is set to false. By default the left margin is 0
TableOfContents The table of contents options. To enable the creation of table of contents from heading tags set the GenerateTableOfContents property on true
TopMargin The rendered PDF document top margin in points. 1 point is 1/72 inch. This property is used only when UsePageSettingsFromRtf is set to false. By default the left margin is 0
UseHeaderFooterFromRtf Whether the running header and footer of the RTF document are rendered on the PDF pages, with the page numbers they contain and without them on a title page. They are not used when a header or footer is set in the converter options. The default value is true
UsePageSettingsFromRtf Whether the page size, orientation and margins of the RTF document are used for the PDF pages. The default value is true
Zoom Gets or sets the RTF viewer zoom percentage, from 10 to 200, decimals allowed. The default value of this property is 100

Methods

AddElectronicInvoice Embeds a Factur-X / ZUGFeRD electronic invoice in the generated PDF document: the invoice XML is attached under the file name the standard prescribes, with the relationship of its profile, and the Factur-X identification metadata is written in the XMP metadata. The document must be generated as PDF/A-3 (PdfA3b, PdfA3u, PdfA3a or PdfUa1PdfA3a for an accessible invoice). A document carries one electronic invoice
AddEndPdf(Byte) Add a PDF to the list of documents to be included after the converted RTF content in the final PDF
AddEndPdf(String) Add a PDF from a file to the list of documents to be included after the converted RTF content in the final PDF
AddFileAttachment Adds a file to the attachments of the generated document. The attachment appears in the Attachments panel of PDF viewers
AddHtmlTemplate(Int32, Int32, Int32, String) Creates a HTML Template object based on the HTML string and an optional base URL. The height of template is auto-resized. To create a template with fixed height use the method with height parameter
AddHtmlTemplate(Int32, Int32, Int32, Int32, String) Creates a HTML Template object based on URL from which the HTML content should be retrieved. The height of template is fixed. If AutoResizeHeight is true, the HTML content may be scaled down to fit the specified height
AddHtmlTemplate(Int32, Int32, Int32, String, String) Creates a HTML Template object to be rendered in PDF pages based on the HTML string and an optional base URL. The height of template is auto-resized. To create a template with fixed height use the method with height parameter
AddHtmlTemplate(Int32, Int32, Int32, Int32, String, String) Creates a HTML Template object to be rendered in PDF pages based on the HTML string and an optional base URL. The height of template is fixed. If AutoResizeHeight is true, the HTML content may be scaled down to fit the specified height
AddHtmlTemplate(Int32, Int32, Int32, PdfTemplateHorizontalAlign, PdfTemplateVerticalAlign, String) Creates a HTML Template object based on the HTML string and an optional base URL. Specifies the horizontal and the vertical alignment of the template on the PDF page. The alignment takes precedence over the X and Y coordinates when set to a value other than None. The height of template is auto-resized. To create a template with fixed height use the method with height parameter
AddHtmlTemplate(Int32, Int32, Int32, Int32, PdfTemplateHorizontalAlign, PdfTemplateVerticalAlign, String) Creates a HTML Template object based on URL from which the HTML content should be retrieved. Specifies the horizontal and the vertical alignment of the template on the PDF page. The alignment takes precedence over the X and Y coordinates when set to a value other than None. The height of template is fixed. If AutoResizeHeight is true, the HTML content may be scaled down to fit the specified height
AddHtmlTemplate(Int32, Int32, Int32, PdfTemplateHorizontalAlign, PdfTemplateVerticalAlign, String, String) Creates a HTML Template object to be rendered in PDF pages based on the HTML string and an optional base URL. Specifies the horizontal and the vertical alignment of the template on the PDF page. The alignment takes precedence over the X and Y coordinates when set to a value other than None. The height of template is auto-resized. To create a template with fixed height use the method with height parameter
AddHtmlTemplate(Int32, Int32, Int32, Int32, PdfTemplateHorizontalAlign, PdfTemplateVerticalAlign, String, String) Creates a HTML Template object to be rendered in PDF pages based on the HTML string and an optional base URL. Specifies the horizontal and the vertical alignment of the template on the PDF page. The alignment takes precedence over the X and Y coordinates when set to a value other than None. The height of template is fixed. If AutoResizeHeight is true, the HTML content may be scaled down to fit the specified height.
AddStartPdf(Byte) Add a PDF from a memory buffer to the list of documents to be included before the converted RTF content in the final PDF
AddStartPdf(String) Add a PDF from a file to the list of documents to be included before the converted RTF content in the final PDF
Equals
(Inherited from Object)
Finalize
(Inherited from Object)
GetHashCode
(Inherited from Object)
GetType
(Inherited from Object)
MemberwiseClone
(Inherited from Object)
ToString
(Inherited from Object)

See Also