public class ChromePdfRenderOptions extends Object implements Cloneable
Render_Api
. Specify options such as Paper-Size, DPI,
and other Chromium specific browser setup options.Constructor and Description |
---|
ChromePdfRenderOptions() |
Modifier and Type | Method and Description |
---|---|
Object |
Clone()
Supports
Cloneable . |
CssMediaType |
getCssMediaType()
Gets css media type.
|
String |
getCustomCssUrl()
Gets custom css url.
|
double |
getCustomPaperHeight()
Gets custom paper height.
|
double |
getCustomPaperWidth()
Gets custom paper width (mm).
|
FitToPaperModes |
getFitToPaperMode()
Behavior when fitting HTML content to a physical paper size.
|
String |
getInputEncoding()
Gets input character encoding as a string;
|
String |
getJavascript()
Get A custom javascript string to be executed after all HTML has loaded but before PDf rendering.
|
double |
getMarginBottom()
Gets margin bottom.
|
double |
getMarginLeft()
Gets margin left.
|
double |
getMarginRight()
Gets margin right.
|
double |
getMarginTop()
Gets margin top.
|
PaperOrientation |
getPaperOrientation()
Gets paper orientation.
|
PaperSize |
getPaperSize()
Gets paper size.
|
int |
getRenderDelay()
Gets render delay.
|
int |
getTimeout()
Gets timeout.
|
String |
getTitle()
Gets title.
|
int |
getViewPortHeight()
Gets view port height.
|
int |
getViewPortWidth()
Gets view port width.
|
int |
getZoom()
Gets zoom.
|
boolean |
isCreatePdfFormsFromHtml()
Is create pdf forms from html.
|
boolean |
isEnableJavaScript()
Is enable JavaScript.
|
boolean |
isGrayScale()
Is gray scale boolean.
|
boolean |
isPrintHtmlBackgrounds()
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 |
setJavascript(String javascript)
Set A custom javascript string to be executed after all HTML has loaded but before PDf rendering.
|
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 |
setPaperOrientation(PaperOrientation value)
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 |
setTitle(String value)
Sets title.
|
void |
setViewPortHeight(int value)
Sets view port height.
|
void |
setViewPortWidth(int value)
Sets view port width.
|
void |
setZoom(int value)
Sets zoom.
|
public boolean isCreatePdfFormsFromHtml()
public void setCreatePdfFormsFromHtml(boolean value)
value
- the valuepublic CssMediaType getCssMediaType()
Note: 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.
public void setCssMediaType(CssMediaType value)
Note: 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.
value
- the valuepublic String getCustomCssUrl()
public void setCustomCssUrl(String value)
value
- the valuepublic double getCustomPaperHeight()
public void setCustomPaperHeight(double value)
value
- the valuepublic double getCustomPaperWidth()
public void setCustomPaperWidth(double value)
value
- the valuepublic boolean isEnableJavaScript()
Also see renderDelay
public void setEnableJavaScript(boolean value)
Also see renderDelay
value
- the valuepublic FitToPaperModes getFitToPaperMode()
getZoom()
and getViewPortWidth()
.public void setFitToPaperMode(FitToPaperModes value)
setZoom(int)
and setViewPortWidth(int)
.value
- the valuepublic boolean isGrayScale()
public void setGrayScale(boolean value)
value
- the valuepublic String getInputEncoding()
public double getMarginBottom()
public void setMarginBottom(double value)
value
- the valuepublic double getMarginLeft()
public void setMarginLeft(double value)
value
- the valuepublic double getMarginRight()
public void setMarginRight(double value)
value
- the valuepublic double getMarginTop()
public void setMarginTop(double value)
value
- the valuepublic PaperOrientation getPaperOrientation()
public void setPaperOrientation(PaperOrientation value)
value
- the valuepublic PaperSize getPaperSize()
Use
setCustomPaperSizeInMillimeters(double, double)
, setCustomPaperSizeInPixelsOrPoints(double, double)
, etc... for custom sizes.
public void setPaperSize(PaperSize value)
Use
setCustomPaperSizeInMillimeters(double, double)
, setCustomPaperSizeInPixelsOrPoints(double, double)
, etc... for custom sizes.
value
- the valuepublic boolean isPrintHtmlBackgrounds()
public void setPrintHtmlBackgrounds(boolean value)
value
- the valuepublic int getRenderDelay()
public void setRenderDelay(int value)
value
- the valuepublic int getTimeout()
public void setTimeout(int value)
value
- the valuepublic String getTitle()
public void setTitle(String value)
value
- the valuepublic int getViewPortHeight()
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.
public void setViewPortHeight(int value)
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.
value
- the valuepublic int getViewPortWidth()
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
public void setViewPortWidth(int value)
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
value
- the valuepublic String getJavascript()
public int getZoom()
public void setZoom(int value)
value
- the valuepublic Object Clone() throws CloneNotSupportedException
Cloneable
. Creates a deep copy of this class instance.CloneNotSupportedException
- the clone not supported exceptionpublic void setCustomPaperSizeInCentimeters(double width, double height)
width
- Custom paper width in cm.height
- Custom paper height in cm.public void setCustomPaperSizeInMillimeters(double width, double height)
width
- Custom paper width in millimeters.height
- Custom paper height in millimeters.public void setCustomPaperSizeInPixelsOrPoints(double width, double height)
width
- Custom paper width in pixels/points.height
- Custom paper height in pixels/points..public void setCustomPaperSizeInPixelsOrPoints(double width, double height, int DPI)
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.public void SetCustomPaperSizeInInches(double width, double height)
width
- Custom paper width in Inches.height
- Custom paper height in Inches.public void setJavascript(String javascript)
javascript
- a javascript string.Copyright © 2022–2023 Iron Software. All rights reserved.