Parameters for converting HTML to PDF using HTMLToPDFJob.

Implements

Constructors

  • Constructs a new HTMLtoPDFParams instance.

    Parameters

    • params: {
          dataToMerge?: object;
          includeHeaderFooter?: boolean;
          pageLayout?: PageLayout;
      }

      The parameters for constructing an instance of HTMLtoPDFParams.

      • Optional dataToMerge?: object

        The JSON data to merge. The data to be used by the javascript in the source html file to manipulate the HTML DOM before it gets converted to PDF. This mechanism is intended to be used to supply data that might otherwise be retrieved using ajax requests.

        To make use of this mechanism, the source html file must include a script element such as:

        <script src='./json.js' type='text/javascript'></script>
        

        where json.js refers to the JSON data, And also Requires javascript in the source html file to make use of this JSON data to manipulate the HTML DOM.

      • Optional includeHeaderFooter?: boolean

        Whether to include header and footer. If true, default header and footer will be included in resulting PDF. Default value is false. The default header consists of the date and the document title. The default footer consists of the file name and page number.

      • Optional pageLayout?: PageLayout

        The intended page layout of the resulting PDF file. The default layout sets the height as 8.5 inches and width as 11 inches.

    Returns HTMLToPDFParams

Properties

_dataToMerge?: string
_includeHeaderFooter?: boolean
_pageLayout?: PageLayout

Accessors

  • get dataToMerge(): undefined | JSON
  • Returns the data to merge.

    Returns undefined | JSON

    The data to merge.

  • get includeHeaderAndFooter(): undefined | boolean
  • Returns whether to include header and footer.

    Returns undefined | boolean

    true if header and footer are to be included, false otherwise.

  • get pageLayout(): undefined | PageLayout
  • Returns the page layout.

    Returns undefined | PageLayout

    The page layout.

Generated using TypeDoc