-
public final class PrintToPDFRequestRequest object containing input parameters for the PageDomain.printToPDF command.
-
-
Field Summary
Fields Modifier and Type Field Description private final Booleanlandscapeprivate final BooleandisplayHeaderFooterprivate final BooleanprintBackgroundprivate final Doublescaleprivate final DoublepaperWidthprivate final DoublepaperHeightprivate final DoublemarginTopprivate final DoublemarginBottomprivate final DoublemarginLeftprivate final DoublemarginRightprivate final StringpageRangesprivate final BooleanignoreInvalidPageRangesprivate final StringheaderTemplateprivate final StringfooterTemplateprivate final BooleanpreferCSSPageSizeprivate final StringtransferMode
-
Constructor Summary
Constructors Constructor Description PrintToPDFRequest(Boolean landscape, Boolean displayHeaderFooter, Boolean printBackground, Double scale, Double paperWidth, Double paperHeight, Double marginTop, Double marginBottom, Double marginLeft, Double marginRight, String pageRanges, Boolean ignoreInvalidPageRanges, String headerTemplate, String footerTemplate, Boolean preferCSSPageSize, String transferMode)
-
Method Summary
Modifier and Type Method Description final Booleancomponent1()final Booleancomponent2()final Booleancomponent3()final Doublecomponent4()final Doublecomponent5()final Doublecomponent6()final Doublecomponent7()final Doublecomponent8()final Doublecomponent9()final Doublecomponent10()final Stringcomponent11()final Booleancomponent12()final Stringcomponent13()final Stringcomponent14()final Booleancomponent15()final Stringcomponent16()final PrintToPDFRequestcopy(Boolean landscape, Boolean displayHeaderFooter, Boolean printBackground, Double scale, Double paperWidth, Double paperHeight, Double marginTop, Double marginBottom, Double marginLeft, Double marginRight, String pageRanges, Boolean ignoreInvalidPageRanges, String headerTemplate, String footerTemplate, Boolean preferCSSPageSize, String transferMode)final BooleangetLandscape()Paper orientation. final BooleangetDisplayHeaderFooter()Display header and footer. final BooleangetPrintBackground()Print background graphics. final DoublegetScale()Scale of the webpage rendering. final DoublegetPaperWidth()Paper width in inches. final DoublegetPaperHeight()Paper height in inches. final DoublegetMarginTop()Top margin in inches. final DoublegetMarginBottom()Bottom margin in inches. final DoublegetMarginLeft()Left margin in inches. final DoublegetMarginRight()Right margin in inches. final StringgetPageRanges()Paper ranges to print, e.g., '1-5, 8, 11-13'. final BooleangetIgnoreInvalidPageRanges()Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. final StringgetHeaderTemplate()HTML template for the print header. final StringgetFooterTemplate()HTML template for the print footer. final BooleangetPreferCSSPageSize()Whether or not to prefer page size as defined by css. final StringgetTransferMode()return as stream -
-
Constructor Detail
-
PrintToPDFRequest
PrintToPDFRequest(Boolean landscape, Boolean displayHeaderFooter, Boolean printBackground, Double scale, Double paperWidth, Double paperHeight, Double marginTop, Double marginBottom, Double marginLeft, Double marginRight, String pageRanges, Boolean ignoreInvalidPageRanges, String headerTemplate, String footerTemplate, Boolean preferCSSPageSize, String transferMode)
-
-
Method Detail
-
component1
final Boolean component1()
-
component2
final Boolean component2()
-
component3
final Boolean component3()
-
component4
final Double component4()
-
component5
final Double component5()
-
component6
final Double component6()
-
component7
final Double component7()
-
component8
final Double component8()
-
component9
final Double component9()
-
component10
final Double component10()
-
component11
final String component11()
-
component12
final Boolean component12()
-
component13
final String component13()
-
component14
final String component14()
-
component15
final Boolean component15()
-
component16
final String component16()
-
copy
final PrintToPDFRequest copy(Boolean landscape, Boolean displayHeaderFooter, Boolean printBackground, Double scale, Double paperWidth, Double paperHeight, Double marginTop, Double marginBottom, Double marginLeft, Double marginRight, String pageRanges, Boolean ignoreInvalidPageRanges, String headerTemplate, String footerTemplate, Boolean preferCSSPageSize, String transferMode)
-
getLandscape
final Boolean getLandscape()
Paper orientation. Defaults to false.
-
getDisplayHeaderFooter
final Boolean getDisplayHeaderFooter()
Display header and footer. Defaults to false.
-
getPrintBackground
final Boolean getPrintBackground()
Print background graphics. Defaults to false.
-
getPaperWidth
final Double getPaperWidth()
Paper width in inches. Defaults to 8.5 inches.
-
getPaperHeight
final Double getPaperHeight()
Paper height in inches. Defaults to 11 inches.
-
getMarginTop
final Double getMarginTop()
Top margin in inches. Defaults to 1cm (~0.4 inches).
-
getMarginBottom
final Double getMarginBottom()
Bottom margin in inches. Defaults to 1cm (~0.4 inches).
-
getMarginLeft
final Double getMarginLeft()
Left margin in inches. Defaults to 1cm (~0.4 inches).
-
getMarginRight
final Double getMarginRight()
Right margin in inches. Defaults to 1cm (~0.4 inches).
-
getPageRanges
final String getPageRanges()
Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
-
getIgnoreInvalidPageRanges
final Boolean getIgnoreInvalidPageRanges()
Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false.
-
getHeaderTemplate
final String getHeaderTemplate()
HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them:
date: formatted print datetitle: document titleurl: document locationpageNumber: current page numbertotalPages: total pages in the document
For example,
<span class=title></span>would generate span containing the title.
-
getFooterTemplate
final String getFooterTemplate()
HTML template for the print footer. Should use the same format as the
headerTemplate.
-
getPreferCSSPageSize
final Boolean getPreferCSSPageSize()
Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
-
getTransferMode
final String getTransferMode()
return as stream
-
-
-
-