Header menu logo fable-electron-docs-api

Options Type

Constructors

Constructor Description

Options(?landscape, ?displayHeaderFooter, ?printBackground, ?scale, ?pageSize, ?margins, ?pageRanges, ?headerTemplate, ?footerTemplate, ?preferCSSPageSize, ?generateTaggedPDF, ?generateDocumentOutline)

Full Usage: Options(?landscape, ?displayHeaderFooter, ?printBackground, ?scale, ?pageSize, ?margins, ?pageRanges, ?headerTemplate, ?footerTemplate, ?preferCSSPageSize, ?generateTaggedPDF, ?generateDocumentOutline)

Parameters:
    ?landscape : bool - Paper orientation.true for landscape, false for portrait. Defaults to false.
    ?displayHeaderFooter : bool - Whether to display header and footer. Defaults to false.
    ?printBackground : bool - Whether to print background graphics. Defaults to false.
    ?scale : float - Scale of the webpage rendering. Defaults to 1.
    ?pageSize : U2<PageSize, Size> - Specify page size of the generated PDF. Can be A0, A1, A2, A3, A4, A5, A6, Legal, Letter, Tabloid, Ledger, or an Object containing height and width in inches. Defaults to Letter.
    ?margins : Margins -
    ?pageRanges : string - Page ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
    ?headerTemplate : string - HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: date (formatted print date), title (document title), url (document location), pageNumber (current page number) and totalPages (total pages in the document). For example, <span class=title></span> would generate span containing the title.
    ?footerTemplate : string - HTML template for the print footer. Should use the same format as the headerTemplate.
    ?preferCSSPageSize : bool - 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.
    ?generateTaggedPDF : bool - Whether or not to generate a tagged (accessible) PDF. Defaults to false. As this property is experimental, the generated PDF may not adhere fully to PDF/UA and WCAG standards.
    ?generateDocumentOutline : bool - Whether or not to generate a PDF document outline from content headers. Defaults to false.

Returns: Options
?landscape : bool

Paper orientation.true for landscape, false for portrait. Defaults to false.

?displayHeaderFooter : bool

Whether to display header and footer. Defaults to false.

?printBackground : bool

Whether to print background graphics. Defaults to false.

?scale : float

Scale of the webpage rendering. Defaults to 1.

?pageSize : U2<PageSize, Size>

Specify page size of the generated PDF. Can be A0, A1, A2, A3, A4, A5, A6, Legal, Letter, Tabloid, Ledger, or an Object containing height and width in inches. Defaults to Letter.

?margins : Margins

?pageRanges : string

Page ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.

?headerTemplate : string

HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: date (formatted print date), title (document title), url (document location), pageNumber (current page number) and totalPages (total pages in the document). For example, <span class=title></span> would generate span containing the title.

?footerTemplate : string

HTML template for the print footer. Should use the same format as the headerTemplate.

?preferCSSPageSize : bool

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.

?generateTaggedPDF : bool

Whether or not to generate a tagged (accessible) PDF. Defaults to false. As this property is experimental, the generated PDF may not adhere fully to PDF/UA and WCAG standards.

?generateDocumentOutline : bool

Whether or not to generate a PDF document outline from content headers. Defaults to false.

Returns: Options

Instance members

Instance member Description

this.displayHeaderFooter

Full Usage: this.displayHeaderFooter

Whether to display header and footer. Defaults to false.

this.footerTemplate

Full Usage: this.footerTemplate

HTML template for the print footer. Should use the same format as the headerTemplate.

this.generateDocumentOutline

Full Usage: this.generateDocumentOutline

Whether or not to generate a PDF document outline from content headers. Defaults to false.

this.generateTaggedPDF

Full Usage: this.generateTaggedPDF

Whether or not to generate a tagged (accessible) PDF. Defaults to false. As this property is experimental, the generated PDF may not adhere fully to PDF/UA and WCAG standards.

this.headerTemplate

Full Usage: this.headerTemplate

HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: date (formatted print date), title (document title), url (document location), pageNumber (current page number) and totalPages (total pages in the document). For example, would generate span containing the title.

this.landscape

Full Usage: this.landscape

Paper orientation.true for landscape, false for portrait. Defaults to false.

this.margins

Full Usage: this.margins

this.pageRanges

Full Usage: this.pageRanges

Page ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.

this.pageSize

Full Usage: this.pageSize

Specify page size of the generated PDF. Can be A0, A1, A2, A3, A4, A5, A6, Legal, Letter, Tabloid, Ledger, or an Object containing height and width in inches. Defaults to Letter.

this.preferCSSPageSize

Full Usage: this.preferCSSPageSize

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.

this.printBackground

Full Usage: this.printBackground

Whether to print background graphics. Defaults to false.

this.scale

Full Usage: this.scale

Scale of the webpage rendering. Defaults to 1.

Type something to start searching.