UNPKG

@adobe/pdfservices-node-sdk

Version:

The Adobe PDF Services Node.js SDK provides APIs for creating, combining, exporting and manipulating PDFs.

58 lines (57 loc) 2.33 kB
import { PDFServicesJobParams } from "../PDFServicesJobParams"; import { PageLayout } from "./PageLayout"; /** * Parameters for converting HTML to PDF using {@link HTMLToPDFJob}. */ export declare class HTMLToPDFParams implements PDFServicesJobParams { private readonly _includeHeaderFooter?; private readonly _pageLayout?; private readonly _dataToMerge?; /** * Constructs a new `HTMLtoPDFParams` instance. * * @param params - The parameters for constructing an instance of `HTMLtoPDFParams`. * @param [params.includeHeaderFooter] - 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. * @param [params.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. * @param [params.dataToMerge] - 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: * * ```html * <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. */ constructor(params: { includeHeaderFooter?: boolean; pageLayout?: PageLayout; dataToMerge?: object; }); /** * Returns whether to include header and footer. * * @returns `true` if header and footer are to be included, `false` otherwise. */ get includeHeaderAndFooter(): boolean | undefined; /** * Returns the page layout. * * @returns The page layout. */ get pageLayout(): PageLayout | undefined; /** * Returns the data to merge. * * @returns The data to merge. */ get dataToMerge(): JSON | undefined; }