Show / Hide Table of Contents

Class HTMLToPDFParams.Builder

Builds a HTMLToPDFParams instance.

Inheritance
System.Object
HTMLToPDFParams.Builder
Namespace: Adobe.PDFServicesSDK.pdfjobs.parameters.htmltopdf
Assembly: Adobe.PDFServicesSDK.Doc.dll
Syntax
public class Builder

Constructors

Builder()

Constructs a Builder instance.

Declaration
public Builder()

Methods

Build()

Returns a new HTMLToPDFParams instance built from the current state of this builder.

Declaration
public HTMLToPDFParams Build()
Returns
Type Description
HTMLToPDFParams

A new HTMLToPDFParams instance

IncludeHeaderFooter(Boolean)

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.

Declaration
public HTMLToPDFParams.Builder IncludeHeaderFooter(bool includeHeaderFooter)
Parameters
Type Name Description
System.Boolean includeHeaderFooter

true if default header and footer should be included in the resulting PDF. Default value is true.

Returns
Type Description
HTMLToPDFParams.Builder

this Builder instance to add any additional parameters

WithDataToMerge(JObject)

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:

    {@code }
    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.

Declaration
public HTMLToPDFParams.Builder WithDataToMerge(JObject dataToMerge)
Parameters
Type Name Description
Newtonsoft.Json.Linq.JObject dataToMerge

JSON object

Returns
Type Description
HTMLToPDFParams.Builder

this Builder instance to add any additional parameters

WithPageLayout(PageLayout)

Sets the pageLayout parameter.

Declaration
public HTMLToPDFParams.Builder WithPageLayout(PageLayout pageLayout)
Parameters
Type Name Description
PageLayout pageLayout

intended page layout of the resulting PDF file.

Returns
Type Description
HTMLToPDFParams.Builder

this Builder instance to add any additional parameters

WithWaitTimeToLoad(Int32)

Sets the waitTimeToLoad parameter

Declaration
public HTMLToPDFParams.Builder WithWaitTimeToLoad(int waitTimeToLoad)
Parameters
Type Name Description
System.Int32 waitTimeToLoad

intended waitTimeToLoad for HTML in milliseconds.

Returns
Type Description
HTMLToPDFParams.Builder

this Builder instance to add any additional parameters

In This Article
Back to top Copyright © 2020 Adobe. All rights reserved.