Class ChromePdfRenderOptions
- All Implemented Interfaces:
Cloneable
Render_Api
. Specify options such as Paper-Size, DPI,
and other Chromium specific browser setup options.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClone()
SupportsCloneable
.Gets css media type.Gets custom css url.double
Gets custom paper height.double
Gets custom paper width (mm).Behavior when fitting HTML content to a physical paper size.Gets input character encoding as a string;double
Gets margin bottom.double
Gets margin left.double
Gets margin right.double
Gets margin top.Gets paper orientation.Gets paper size.int
Gets render delay.int
Gets timeout.getTitle()
Gets title.int
Gets view port height.int
Gets view port width.int
getZoom()
Gets zoom.boolean
Is create pdf forms from html.boolean
Is enable JavaScript.boolean
Is gray scale boolean.boolean
Is print html backgrounds boolean.void
setCreatePdfFormsFromHtml
(boolean value) Sets create pdf forms from html.void
setCssMediaType
(CssMediaType value) Sets css media type.void
setCustomCssUrl
(String value) Sets custom css url.void
setCustomPaperHeight
(double value) Sets custom paper height (mm).void
setCustomPaperSizeInCentimeters
(double width, double height) Set an output paper size for PDF pages.void
SetCustomPaperSizeInInches
(double width, double height) Set an output paper size for PDF pages.void
setCustomPaperSizeInMillimeters
(double width, double height) Set an output paper size for PDF pages.void
setCustomPaperSizeInPixelsOrPoints
(double width, double height) Set an output paper size for PDF pages.void
setCustomPaperSizeInPixelsOrPoints
(double width, double height, int DPI) Set an output paper size for PDF pages.void
setCustomPaperWidth
(double value) Sets custom paper width (mm).void
setEnableJavaScript
(boolean value) Sets enable JavaScript.void
setFitToPaperMode
(FitToPaperModes value) Behavior when fitting HTML content to a physical paper size.void
setGrayScale
(boolean value) Sets gray scale.void
setMarginBottom
(double value) Sets margin bottom.void
setMarginLeft
(double value) Sets margin left.void
setMarginRight
(double value) Sets margin right.void
setMarginTop
(double value) Sets margin top.void
Sets paper orientation.void
setPaperSize
(PaperSize value) Sets paper size.void
setPrintHtmlBackgrounds
(boolean value) Sets print html backgrounds.void
setRenderDelay
(int value) Sets render delay.void
setTimeout
(int value) Sets timeout.void
Sets title.void
setViewPortHeight
(int value) Sets view port height.void
setViewPortWidth
(int value) Sets view port width.void
setZoom
(int value) Sets zoom.
-
Constructor Details
-
ChromePdfRenderOptions
public ChromePdfRenderOptions()
-
-
Method Details
-
isCreatePdfFormsFromHtml
public boolean isCreatePdfFormsFromHtml()Is create pdf forms from html. Turns all Html forms elements into editable PDF forms.- Returns:
- the boolean
-
setCreatePdfFormsFromHtml
public void setCreatePdfFormsFromHtml(boolean value) Sets create pdf forms from html. Turns all Html forms elements into editable PDF forms.- Parameters:
value
- the value
-
getCssMediaType
Gets 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
-
setCssMediaType
Sets 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
-
getCustomCssUrl
Gets 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
-
setCustomCssUrl
Sets 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
-
getCustomPaperHeight
public double getCustomPaperHeight()Gets custom paper height.- Returns:
- the custom paper height
-
setCustomPaperHeight
public void setCustomPaperHeight(double value) Sets custom paper height (mm).- Parameters:
value
- the value
-
getCustomPaperWidth
public double getCustomPaperWidth()Gets custom paper width (mm).- Returns:
- the custom paper width
-
setCustomPaperWidth
public void setCustomPaperWidth(double value) Sets custom paper width (mm).- Parameters:
value
- the value
-
isEnableJavaScript
public 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
-
setEnableJavaScript
public 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
-
getFitToPaperMode
Behavior when fitting HTML content to a physical paper size. DeterminesgetZoom()
andgetViewPortWidth()
.- Returns:
- the boolean
-
setFitToPaperMode
Behavior when fitting HTML content to a physical paper size. DeterminessetZoom(int)
andsetViewPortWidth(int)
.- Parameters:
value
- the value
-
isGrayScale
public boolean isGrayScale()Is gray scale boolean. Outputs a black-and-white PDF.- Returns:
- the boolean
-
setGrayScale
public void setGrayScale(boolean value) Sets gray scale. Outputs a black-and-white PDF.- Parameters:
value
- the value
-
getInputEncoding
Gets input character encoding as a string;- Returns:
- the input encoding
-
getMarginBottom
public 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
-
setMarginBottom
public 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
-
getMarginLeft
public 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
-
setMarginLeft
public 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
-
getMarginRight
public 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
-
setMarginRight
public 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
-
getMarginTop
public 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
-
setMarginTop
public 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
-
getPaperOrientation
Gets paper orientation. The PDF paper orientation. E.g. Portrait or Landscape.- Returns:
- the paper orientation
-
setPaperOrientation
Sets paper orientation. The PDF paper orientation. E.g. Portrait or Landscape.- Parameters:
value
- the value
-
getPaperSize
Gets 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
-
setPaperSize
Sets 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
-
isPrintHtmlBackgrounds
public boolean isPrintHtmlBackgrounds()Is print html backgrounds boolean. Prints background-colors and images from Html.- Returns:
- the boolean
-
setPrintHtmlBackgrounds
public void setPrintHtmlBackgrounds(boolean value) Sets print html backgrounds. Prints background-colors and images from Html.- Parameters:
value
- the value
-
getRenderDelay
public 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
-
setRenderDelay
public 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
-
getTimeout
public int getTimeout()Gets timeout. Render timeout in seconds.- Returns:
- the timeout
-
setTimeout
public void setTimeout(int value) Sets timeout. Render timeout in seconds.- Parameters:
value
- the value
-
getTitle
Gets title. PDF Document Name and Title meta-data. Not required. Useful for mail-merge and file naming.- Returns:
- the title
-
setTitle
Sets title. PDF Document Name and Title meta-data. Not required. Useful for mail-merge and file naming.- Parameters:
value
- the value
-
getViewPortHeight
public 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
-
setViewPortHeight
public 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
-
getViewPortWidth
public 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
-
setViewPortWidth
public 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
-
getZoom
public int getZoom()Gets zoom. The zoom level in %. Enlarges the rendering size of Html documents.- Returns:
- the zoom
-
setZoom
public void setZoom(int value) Sets zoom. The zoom level in %. Enlarges the rendering size of Html documents.- Parameters:
value
- the value
-
Clone
SupportsCloneable
. 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
-
setCustomPaperSizeInCentimeters
public 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.
-
setCustomPaperSizeInMillimeters
public 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.
-
setCustomPaperSizeInPixelsOrPoints
public 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..
-
setCustomPaperSizeInPixelsOrPoints
public 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.
-
SetCustomPaperSizeInInches
public 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.
-