Class ChromePdfRenderOptions
- All Implemented Interfaces:
- Cloneable
Render_Api. Specify options such as Paper-Size, DPI,
 and other Chromium specific browser setup options.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionClone()SupportsCloneable.Gets css media type.Gets custom css url.doubleGets custom paper height.doubleGets custom paper width (mm).Behavior when fitting HTML content to a physical paper size.Gets input character encoding as a string;Get A custom javascript string to be executed after all HTML has loaded but before PDf rendering.doubleGets margin bottom.doubleGets margin left.doubleGets margin right.doubleGets margin top.Gets paper orientation.Gets paper size.intGets render delay.intGets timeout.getTitle()Gets title.intGets view port height.intGets view port width.intgetZoom()Gets zoom.booleanIs create pdf forms from html.booleanIs enable JavaScript.booleanIs gray scale boolean.booleanIs print html backgrounds boolean.voidsetCreatePdfFormsFromHtml(boolean value) Sets create pdf forms from html.voidsetCssMediaType(CssMediaType value) Sets css media type.voidsetCustomCssUrl(String value) Sets custom css url.voidsetCustomPaperHeight(double value) Sets custom paper height (mm).voidsetCustomPaperSizeInCentimeters(double width, double height) Set an output paper size for PDF pages.voidSetCustomPaperSizeInInches(double width, double height) Set an output paper size for PDF pages.voidsetCustomPaperSizeInMillimeters(double width, double height) Set an output paper size for PDF pages.voidsetCustomPaperSizeInPixelsOrPoints(double width, double height) Set an output paper size for PDF pages.voidsetCustomPaperSizeInPixelsOrPoints(double width, double height, int DPI) Set an output paper size for PDF pages.voidsetCustomPaperWidth(double value) Sets custom paper width (mm).voidsetEnableJavaScript(boolean value) Sets enable JavaScript.voidsetFitToPaperMode(FitToPaperModes value) Behavior when fitting HTML content to a physical paper size.voidsetGrayScale(boolean value) Sets gray scale.voidsetJavascript(String javascript) Set A custom javascript string to be executed after all HTML has loaded but before PDf rendering.voidsetMarginBottom(double value) Sets margin bottom.voidsetMarginLeft(double value) Sets margin left.voidsetMarginRight(double value) Sets margin right.voidsetMarginTop(double value) Sets margin top.voidSets paper orientation.voidsetPaperSize(PaperSize value) Sets paper size.voidsetPrintHtmlBackgrounds(boolean value) Sets print html backgrounds.voidsetRenderDelay(int value) Sets render delay.voidsetTimeout(int value) Sets timeout.voidSets title.voidsetViewPortHeight(int value) Sets view port height.voidsetViewPortWidth(int value) Sets view port width.voidsetZoom(int value) Sets zoom.
- 
Constructor Details- 
ChromePdfRenderOptionspublic ChromePdfRenderOptions()
 
- 
- 
Method Details- 
isCreatePdfFormsFromHtmlpublic boolean isCreatePdfFormsFromHtml()Is create pdf forms from html. Turns all Html forms elements into editable PDF forms.- Returns:
- the boolean
 
- 
setCreatePdfFormsFromHtmlpublic void setCreatePdfFormsFromHtml(boolean value) Sets create pdf forms from html. Turns all Html forms elements into editable PDF forms.- Parameters:
- value- the value
 
- 
getCssMediaTypeGets css media type. Enables Media="screen" CSS Styles and StyleSheetsNote: By setting AllowScreenCss=false, IronPdf renders PDFs from HTML using CSS for media="print" as if printing a web page in a browser print dialog. - Returns:
- the css media type
 
- 
setCssMediaTypeSets css media type. Enables Media="screen" CSS Styles and StyleSheetsNote: By setting AllowScreenCss=false, IronPdf renders PDFs from HTML using CSS for media="print" as if printing a web page in a browser print dialog. - Parameters:
- value- the value
 
- 
getCustomCssUrlGets custom css url. Allows a custom CSS style-sheet to be applied to Html before rendering. Maybe a local file path, or remote url.- Returns:
- the custom css url
 
- 
setCustomCssUrlSets custom css url. Allows a custom CSS style-sheet to be applied to Html before rendering. Maybe a local file path, or remote url.- Parameters:
- value- the value
 
- 
getCustomPaperHeightpublic double getCustomPaperHeight()Gets custom paper height.- Returns:
- the custom paper height
 
- 
setCustomPaperHeightpublic void setCustomPaperHeight(double value) Sets custom paper height (mm).- Parameters:
- value- the value
 
- 
getCustomPaperWidthpublic double getCustomPaperWidth()Gets custom paper width (mm).- Returns:
- the custom paper width
 
- 
setCustomPaperWidthpublic void setCustomPaperWidth(double value) Sets custom paper width (mm).- Parameters:
- value- the value
 
- 
isEnableJavaScriptpublic boolean isEnableJavaScript()Is enable JavaScript. Enables JavaScript and Json to be executed before the page is rendered. Ideal for printing from Ajax / Angular Applications.Also see renderDelay- Returns:
- the boolean
 
- 
setEnableJavaScriptpublic void setEnableJavaScript(boolean value) Sets enable JavaScript. Enables JavaScript and Json to be executed before the page is rendered. Ideal for printing from Ajax / Angular Applications.Also see renderDelay- Parameters:
- value- the value
 
- 
getFitToPaperModeBehavior when fitting HTML content to a physical paper size. DeterminesgetZoom()andgetViewPortWidth().- Returns:
- the boolean
 
- 
setFitToPaperModeBehavior when fitting HTML content to a physical paper size. DeterminessetZoom(int)andsetViewPortWidth(int).- Parameters:
- value- the value
 
- 
isGrayScalepublic boolean isGrayScale()Is gray scale boolean. Outputs a black-and-white PDF.- Returns:
- the boolean
 
- 
setGrayScalepublic void setGrayScale(boolean value) Sets gray scale. Outputs a black-and-white PDF.- Parameters:
- value- the value
 
- 
getInputEncodingGets input character encoding as a string;- Returns:
- the input encoding
 
- 
getMarginBottompublic double getMarginBottom()Gets margin bottom. Bottom Pdf "paper" margin in millimeters. Set to zero for border-less and commercial printing applications.- Returns:
- the margin bottom
 
- 
setMarginBottompublic void setMarginBottom(double value) Sets margin bottom. Bottom Pdf "paper" margin in millimeters. Set to zero for border-less and commercial printing applications.- Parameters:
- value- the value
 
- 
getMarginLeftpublic double getMarginLeft()Gets margin left. Left Pdf "paper" margin in millimeters. Set to zero for border-less and commercial printing applications.- Returns:
- the margin left
 
- 
setMarginLeftpublic void setMarginLeft(double value) Sets margin left. Left Pdf "paper" margin in millimeters. Set to zero for border-less and commercial printing applications.- Parameters:
- value- the value
 
- 
getMarginRightpublic double getMarginRight()Gets margin right. Right Pdf "paper" margin in millimeters. Set to zero for border-less and commercial printing applications.- Returns:
- the margin right
 
- 
setMarginRightpublic void setMarginRight(double value) Sets margin right. Right Pdf "paper" margin in millimeters. Set to zero for border-less and commercial printing applications.- Parameters:
- value- the value
 
- 
getMarginToppublic double getMarginTop()Gets margin top. Top Pdf "paper" margin in millimeters. Set to zero for border-less and commercial printing applications.- Returns:
- the margin top
 
- 
setMarginToppublic void setMarginTop(double value) Sets margin top. Top Pdf "paper" margin in millimeters. Set to zero for border-less and commercial printing applications.- Parameters:
- value- the value
 
- 
getPaperOrientationGets paper orientation. The PDF paper orientation. E.g. Portrait or Landscape.- Returns:
- the paper orientation
 
- 
setPaperOrientationSets paper orientation. The PDF paper orientation. E.g. Portrait or Landscape.- Parameters:
- value- the value
 
- 
getPaperSizeGets paper size. Set an output paper size for PDF pages.Use setCustomPaperSizeInMillimeters(double, double),setCustomPaperSizeInPixelsOrPoints(double, double), etc... for custom sizes.- Returns:
- the paper size
 
- 
setPaperSizeSets paper size. Set an output paper size for PDF pages.Use setCustomPaperSizeInMillimeters(double, double),setCustomPaperSizeInPixelsOrPoints(double, double), etc... for custom sizes.- Parameters:
- value- the value
 
- 
isPrintHtmlBackgroundspublic boolean isPrintHtmlBackgrounds()Is print html backgrounds boolean. Prints background-colors and images from Html.- Returns:
- the boolean
 
- 
setPrintHtmlBackgroundspublic void setPrintHtmlBackgrounds(boolean value) Sets print html backgrounds. Prints background-colors and images from Html.- Parameters:
- value- the value
 
- 
getRenderDelaypublic int getRenderDelay()Gets render delay. Milliseconds to wait after Html is rendered before printing. This can use useful when considering the rendering of JavaScript, Ajax or animations.- Returns:
- the render delay
 
- 
setRenderDelaypublic void setRenderDelay(int value) Sets render delay. Milliseconds to wait after Html is rendered before printing. This can use useful when considering the rendering of JavaScript, Ajax or animations.- Parameters:
- value- the value
 
- 
getTimeoutpublic int getTimeout()Gets timeout. Render timeout in seconds.- Returns:
- the timeout
 
- 
setTimeoutpublic void setTimeout(int value) Sets timeout. Render timeout in seconds.- Parameters:
- value- the value
 
- 
getTitleGets title. PDF Document Name and Title meta-data. Not required. Useful for mail-merge and file naming.- Returns:
- the title
 
- 
setTitleSets title. PDF Document Name and Title meta-data. Not required. Useful for mail-merge and file naming.- Parameters:
- value- the value
 
- 
getViewPortHeightpublic int getViewPortHeight()Gets view port height. Defines a virtual screen height used to render HTML to PDF in IronPdf. Measured in pixels.Viewport size is important in modern responsive HTML5 + CSS3 websites (e.g. Bootstrap framework websites) because the rendering and order of elements on the screen is dependent on viewport size. The default viewport is 1280px wide by 1024px high to ensure the desktop version of a website is rendered unless otherwise specified. Smaller sizes (particularly width) will render responsive versions of many websites. - Returns:
- the view port height
 
- 
setViewPortHeightpublic void setViewPortHeight(int value) Sets view port height. Defines a virtual screen height used to render HTML to PDF in IronPdf. Measured in pixels.Viewport size is important in modern responsive HTML5 + CSS3 websites (e.g. Bootstrap framework websites) because the rendering and order of elements on the screen is dependent on viewport size. The default viewport is 1280px wide by 1024px high to ensure the desktop version of a website is rendered unless otherwise specified. Smaller sizes (particularly width) will render responsive versions of many websites. - Parameters:
- value- the value
 
- 
getViewPortWidthpublic int getViewPortWidth()Gets view port width. Defines a virtual screen width used to render HTML to PDF in IronPdf. Measured in pixels.Viewport size is important in modern responsive HTML5 + CSS3 websites (e.g. Bootstrap framework websites) because the rendering and order of elements on the screen is dependent on viewport size. The default viewport is 1280px wide by 1024px high to ensure the desktop version of a website is rendered unless otherwise specified. Smaller sizes (particularly width) will render responsive versions of many website - Returns:
- the view port width
 
- 
setViewPortWidthpublic void setViewPortWidth(int value) Sets view port width. Defines a virtual screen width used to render HTML to PDF in IronPdf. Measured in pixels.Viewport size is important in modern responsive HTML5 + CSS3 websites (e.g. Bootstrap framework websites) because the rendering and order of elements on the screen is dependent on viewport size. The default viewport is 1280px wide by 1024px high to ensure the desktop version of a website is rendered unless otherwise specified. Smaller sizes (particularly width) will render responsive versions of many website - Parameters:
- value- the value
 
- 
getJavascriptGet A custom javascript string to be executed after all HTML has loaded but before PDf rendering.- Returns:
- the javascript string
 
- 
getZoompublic int getZoom()Gets zoom. The zoom level in %. Enlarges the rendering size of Html documents.- Returns:
- the zoom
 
- 
setZoompublic void setZoom(int value) Sets zoom. The zoom level in %. Enlarges the rendering size of Html documents.- Parameters:
- value- the value
 
- 
CloneSupportsCloneable. Creates a deep copy of this class instance.- Returns:
- A deep clone of this instance. Use explicit casting to convert object back to the intended type.
- Throws:
- CloneNotSupportedException- the clone not supported exception
 
- 
setCustomPaperSizeInCentimeterspublic void setCustomPaperSizeInCentimeters(double width, double height) Set an output paper size for PDF pages. Dimensions are in Centimeters.- Parameters:
- width- Custom paper width in cm.
- height- Custom paper height in cm.
 
- 
setCustomPaperSizeInMillimeterspublic void setCustomPaperSizeInMillimeters(double width, double height) Set an output paper size for PDF pages. Dimensions are in millimeters.- Parameters:
- width- Custom paper width in millimeters.
- height- Custom paper height in millimeters.
 
- 
setCustomPaperSizeInPixelsOrPointspublic void setCustomPaperSizeInPixelsOrPoints(double width, double height) Set an output paper size for PDF pages. Dimensions are in screen Pixels or printer Points.- Parameters:
- width- Custom paper width in pixels/points.
- height- Custom paper height in pixels/points..
 
- 
setCustomPaperSizeInPixelsOrPointspublic void setCustomPaperSizeInPixelsOrPoints(double width, double height, int DPI) Set an output paper size for PDF pages. Dimensions are in screen Pixels or printer Points.- Parameters:
- width- Custom paper width in pixels/points.
- height- Custom paper height in pixels/points.
- DPI- Intended print resolution of the PDF. To be clear PDFs have no fixed DPI/PPI value for rendering. 72 and 96 are common onscreen values. 300 is a common value used in commercial printing.
 
- 
SetCustomPaperSizeInInchespublic void SetCustomPaperSizeInInches(double width, double height) Set an output paper size for PDF pages. Dimensions are in Inches.- Parameters:
- width- Custom paper width in Inches.
- height- Custom paper height in Inches.
 
- 
setJavascriptSet A custom javascript string to be executed after all HTML has loaded but before PDf rendering.- Parameters:
- javascript- a javascript string.
 
 
-