Click or drag to resize

PdfDocumentOptions Class

This class encapsulates the options to control the PDF document redering process. The PdfConverter class define a reference to an object of this type.
Inheritance Hierarchy
SystemObject
  ExpertPdf.HtmlToPdfPdfDocumentOptions

Namespace:  ExpertPdf.HtmlToPdf
Assembly:  ephtmltopdf (in ephtmltopdf.dll) Version: 17.0.0
Syntax
public class PdfDocumentOptions

The PdfDocumentOptions type exposes the following members.

Constructors
  NameDescription
Public methodPdfDocumentOptions
Top
Properties
  NameDescription
Public propertyAppendPDFFile
The full path of an existing PDF document to be appended to the PDF document resulted after HTML conversion. Headers and footers are not applied on the appended document.
Public propertyAppendPDFFileArray
An array of full paths of existing PDF documents to be appended to the PDF document resulted after HTML conversion. Headers and footers are not applied on the appended documents.
Public propertyAppendPDFStream
A PDF stream to be appended to the PDF document resulted after HTML conversion. Headers and footers are not applied on the appended document.
Public propertyAppendPDFStreamArray
An array of PDF streams to be appended to the PDF document resulted after HTML conversion. Headers and footers are not applied on the appended documents.
Public propertyAutoSizePdfPage
When the property AutoSizePdfPage property is true the converter will automatically calculate the PDF page size such that all the HTML content will be visible in the resulted PDF document. This property has effect only when the FitWidth and FitHeight properties are false. When the FitWidth property is false (the HTML content is rendered at real size) and the AutoSizePdfPage is false the rendered HTML content could be cut off at the right of the generated PDF document if the PDF page is not wide enough to display the whole content.
Public propertyBottomMargin
The rendered PDF document bottom margin in points. 1 point is 1/72 inch.
Public propertyCustomPdfPageSize
This property gives the PDF page size when the PdfPageSize property is set Custom.
Public propertyEmbedFonts
When true this options instructs the converter to embed all the true type fonts into the PDF document. The default value of this property is false.
Public propertyFitHeight
When this property is true the HTML content will be resized if necessary to fit the available height in PDF page. By default this property is false.
Public propertyFitWidth
When this property is true the HTML content will be resized if necessary to fit the available width in PDF page. By default this property is true and the content will be resized if necessary to fit the available width in PDF page. When this property is false the HTML content is not resized (is rendered at the real size) and therefore it could be cut off at the right size if the PDF page is not enough wide to display the whole HTML content. In this case the AutoSizePdfPage property can be set on true to automatically resize the PDF page width to display the whole content.
Public propertyGenerateSelectablePdf
When this property is true the generated PDF will contain selectable text. When this property is false, the converter will embed a snapshot image of the HTML document in PDF. The default value of this property is true.
Public propertyInternalLinksEnabled
When true this options instructs the converter to convert the internal HTML links (links with anchors) to internal PDF links. This feature can be used for example to create table of contents in the generated PDF. The default value is true.
Public propertyJpegCompressionEnabled
Gets or sets a flag indicating if the JPEG compression is enabled or not for the images in the generated PDF. By default the JPEG compression is enabled to reduce the size of the generated PDF. When the JPEG compression is enabled the quality of the images in the generated PDF is lower than the quality of the original images in the HTML document, function of the JpegCompressionLevel parameter. When the JpegCompressionLevel is increased, the quality of the images in PDF decreases.
Public propertyJpegCompressionLevel
Gets or sets the compression level of images in the generated PDF as an integer value between 0 and 100. This property has effect only when the JpegCompressionEnabled is true. When the JpegCompressionLevel is 0, the compression rate is the lowest and the quality of the images is the best. When the JpegCompressionLevel is 100, the compression rate is the highest and quality of the images in PDF is the worst. The default JPEG compression level is 10, which should offer a good balance between the compression rate and the quality of the images in PDF.
Public propertyLeftMargin
The rendered PDF document left margin in points. 1 point is 1/72 inch.
Public propertyLiveUrlsEnabled
When true this options instructs the converter to convert the external links from HTML to PDF links. The default value is true.
Public propertyPdfCompressionLevel
This property controls the compression level of the rendered PDF document.
Public propertyPdfPageOrientation
This property controls the page orientation of the rendered PDF document pages. The default orientation is Portrait.
Public propertyPdfPageSize
This property controls the size of the rendered PDF document pages. The default size of the PDF document is A4. When this property is set to PdfPageSize.Custom, a custom size in points for the generated PDF document can be specified using the CustomPdfPageSize property.
Public propertyPrependPDFFile
The full path of an existing PDF document which will prefix the PDF document resulted after HTML conversion. This property can be used to add a cover pages to the document resulted after HTML conversion. Headers and footers are not applied on the prepended document.
Public propertyPrependPDFFileArray
An array of full paths of existing PDF documents which will prefix the PDF document resulted after HTML conversion. This property can be used to add a cover page or document to the document resulted after HTML conversion. Headers and footers are not applied on the prepended documents.
Public propertyPrependPDFStream
The PDF stream which will prefix the PDF document resulted after HTML conversion. This property can be used to add a cover pages to the document resulted after HTML conversion. Headers and footers are not applied on the prepended document.
Public propertyPrependPDFStreamArray
An array of PDF streams which will prefix the PDF document resulted after HTML conversion. This property can be used to add cover pages to the document resulted after HTML conversion. Headers and footers are not applied on the prepended documents.
Public propertyRightMargin
The rendered PDF document right margin in points. 1 point is 1/72 inch.
Public propertyShowFooter
This property controls the whether the footer appears or not in the rendered PDF document. The footer properties can be further customized by setting the properties of the PDFFooterOptions object exposed by the PDFFooterOptions property of the PDFConverter class. The default value is false.
Public propertyShowHeader
This property controls the whether the header appears or not in the rendered PDF document. The header properties can be further customized by setting the properties of the PDFHeaderOptions object exposed by the PDFHeaderOptions property of the PdfConverter class. The default value of this property is false.
Public propertySinglePage
When this property is true the converter will generate a single PDF page with a custom size calculated to display the whole HTML content and any specified header and footer. If the FitWidth property is true the specified PDF page width will be preserved, otherwise the PDF page width is automatically calculated by the converter to display the whole HTML content at real size.
Public propertyStretchToFit
This property has effect only when FitWidth property is true. When FitWidth is true and this property is true the HTML content will be stretched if necessary to fit the available width in PDF page. By default this property is false and the content will not be stretched to fit the available width in PDF page.
Public propertyTopMargin
The rendered PDF document top margin in points. 1 point is 1/72 inch.
Top
See Also