PdfPrintOptions Fields

The PdfPrintOptions type exposes the following members.

Fields
  NameDescription
Public fieldCreatePdfFormsFromHtml
Turns all Html forms elements into editable PDF forms.
Public fieldCssMediaType
Enables Media="screen" CSS Styles and StyleSheets

Note: By setting AllowScreenCss=false, IronPdf prints using CSS for media="print" only.

Public fieldCustomCssUrl
Allows a custom CSS style-sheet to be applied to Html before rendering. May be a local file path, or remote url.
Public fieldDPI
Printing output DPI. 300 is standard for most print jobs. Higher resolutions produce clearer images and text, but also larger PDF files.
Public fieldEnableJavaScript
Enables JavaScript and Json to be executed before the page is rendered. Ideal for printing from Ajax / Angular Applications.

Also see RenderDelay

Public fieldFirstPageNumber
First page number to be used in PDF headers and footers.
Public fieldFitToPaperWidth
Where possible, shrinks the PDF content to 1 page of paper width.

This applies when the PDF content is too wide for the given PaperSize (given that 1 HTML pixel = 1 DPI).

Public fieldFooter
Sets the footer content for every PDF page as Html or String. Supports 'mail-merge'.
Public fieldGenerateUniqueDocumentIdentifiers

if false, Guid is not generated inside PDF DOM (better for unit testing) and BinaryData of two identical PDF files is the same.

If true, Guid is generated inside PDF DOM (better for security) and BinaryData of two identical PDF files differs.

Default value is false.

Public fieldGrayScale
Outputs a black-and-white PDF
Public fieldHeader
Sets the header content for every PDF page as Html or String. Supports 'mail-merge'.
Public fieldInputEncoding
The input character encoding as a string;
Public fieldJpegQuality
Quality of any image that must be re-sampled. 0-100
Public fieldMarginBottom
Paper margin in millimeters. Set to zero for border-less and commercial printing applications.
Public fieldMarginLeft
Paper margin in millimeters. Set to zero for border-less and commercial printing applications.
Public fieldMarginRight
Paper margin in millimeters. Set to zero for border-less and commercial printing applications.
Public fieldMarginTop
Paper margin in millimeters. Set to zero for border-less and commercial printing applications.
Public fieldPaperOrientation
The PDF paper orientation.
Public fieldPaperSize
Set an output paper size for PDF pages. System.Drawing.Printing.PaperKind.

Use SetCustomPaperSize(int width, int height) for custom sizes.

Public fieldPrintHtmlBackgrounds
Prints background-colors and images from Html
Public fieldRenderDelay
Milliseconds to wait after Html is rendered before printing. This can use useful when considering the rendering of JavaScript, Ajax or animations.
Public fieldTitle
PDF Document Name and Title meta-data. Not required.
Public fieldZoom
The zoom level in %. Enlarges the rendering size of Html documents.
Top
See Also
Install with Nuget