Click or drag to resize

PdfPrintOptions Class

PDF output options for IronPdf. Specifies options such as Paper-Size, DPI, Headers and Footers.
Inheritance Hierarchy
SystemObject
  IronPdfPdfPrintOptions

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 4.4.2.27556 (4.4.4.0)
Syntax
public class PdfPrintOptions

The PdfPrintOptions type exposes the following members.

Constructors
  NameDescription
Public methodPdfPrintOptions
Initializes a new instance of the PdfPrintOptions class
Top
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodSetCustomPaperSize
Sets the size of the custom paper. Depreciated.
Public methodSetCustomPaperSizeInInches
Set an output paper size for PDF pages. Dimensions are in Inches.
Public methodSetCustomPaperSizeinMilimeters
Set an output paper size for PDF pages. Dimensions are in millimeters.
Public methodToString (Inherited from Object.)
Top
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 - RenderDelay

Public fieldFirstPageNumber
First page number to be used in PDF headers and footers.
Public fieldFitToPaperWidth
Where possible, fits the PDF content to 1 page width.
Public fieldFooter
Sets the header content for every PDF page as Html or String. Supports 'mail-merge'.
Public fieldGrayScale
Outputs a black-and-white PDF
Public fieldHeader
Sets the footer 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