Constructor
new CreatePDFFromHtmlOptionsBuilder()
- Description:
Constructs a CreatePDFFromHtmlOptionsBuilder instance.
Methods
includesHeaderFooter(includeHeaderFooternon-null) → {CreatePDFFromHtmlOptionsBuilder}
- Description:
Sets the includeHeaderFooter parameter. If true, default header and footer will be included in resulting PDF. The default header consists of the date and the document.title. The default footer consists of the file name and page number.
Parameters:
Name | Type | Description |
---|---|---|
includeHeaderFooter |
Boolean | True if default header and footer should be included in the resulting PDF. Default value is true. |
Returns:
This Builder instance to add any additional parameters.
withPageLayout(pageLayoutnon-null) → {CreatePDFFromHtmlOptionsBuilder}
- Description:
Sets the pageLayout parameter.
Parameters:
Name | Type | Description |
---|---|---|
pageLayout |
PageLayout | Intended page layout of the resulting PDF file. |
Returns:
This builder instance to add any additional parameters.
withDataToMerge(jsonValueopt) → {CreatePDFFromHtmlOptionsBuilder}
- Description:
Sets 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.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
jsonValue |
Object |
<optional> |
JSON object. |
Returns:
This builder instance to add any additional parameters.
build() → {CreatePDFFromHtmlOptions}
- Description:
Returns a new CreatePDFFromHtmlOptions instance built from the current state of this builder.
Returns:
A CreatePDFFromHtmlOptions instance.