Package com.pdfgate
Class GeneratePdfParams
java.lang.Object
com.pdfgate.GeneratePdfParams
Parameters for generating a PDF from raw HTML or a public URL.
Provide either html or url. Additional options control page size,
margins, rendering behavior, media emulation, and advanced wait conditions. Responses are
JSON-only; use GeneratePdfParams.Builder.build() for a PdfGateDocument response.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder forGeneratePdfParams.static final classSequence of selectors to click in order.static final classConfiguration for click selector chains.static enumMedia types for CSS emulation during rendering.static enumOrientation options for generated PDFs.static final classAuthentication credentials for accessing protected web content.static enumSupported page sizes for generated PDFs.static final classMargins to apply to a PDF page.static final classViewport dimensions for rendering. -
Method Summary
Modifier and TypeMethodDescriptionstatic GeneratePdfParams.Builderbuilder()Creates a new builder for generate PDF parameters.Returns authentication credentials for protected content, if provided.Returns the selector to click before rendering, if provided.Returns click chain setup used before rendering, if provided.getCss()Returns additional CSS to apply during rendering, if provided.getDelay()Returns the delay in milliseconds before rendering, if provided.Returns the CSS media type to emulate during rendering, if provided.Returns whether interactive form fields should be enabled, if provided.Returns the HTML footer applied to each page, if provided.Returns the HTML header applied to each page, if provided.Returns the custom page height in pixels, if provided.getHtml()Returns the raw HTML content to render.Returns custom HTTP headers applied when loading the target URL, if provided.Returns JavaScript to run before rendering, if provided.Returns whether the API should return JSON instead of raw bytes.Returns whether images must load before rendering, if provided.Returns the page margins, if provided.Returns metadata to attach to the generated document, if provided.Returns the page orientation, if provided.Returns the page ranges to include, if provided.Returns the requested page size preset.Returns the pre-signed URL expiration time in seconds, if provided.Returns whether to print background graphics, if provided.getScale()Returns the scale factor applied during rendering, if provided.Returns the timeout in milliseconds for the render, if provided.getUrl()Returns the public URL to render.Returns the custom user agent string, if provided.Returns the viewport size for rendering, if provided.Returns whether to wait for network idle before rendering, if provided.Returns the selector to wait for before rendering, if provided.getWidth()Returns the custom page width in pixels, if provided.booleanReturns whether the API should return JSON instead of raw bytes.
-
Method Details
-
builder
Creates a new builder for generate PDF parameters.- Returns:
- the builder for generate PDF parameters.
-
getHtml
Returns the raw HTML content to render.- Returns:
- the raw HTML content to render.
-
getUrl
Returns the public URL to render.- Returns:
- the public URL to render.
-
getJsonResponse
Returns whether the API should return JSON instead of raw bytes.- Returns:
- whether the API should return JSON instead of raw bytes.
-
isJsonResponse
public boolean isJsonResponse()Returns whether the API should return JSON instead of raw bytes.- Returns:
- whether the API should return JSON instead of raw bytes.
-
getPreSignedUrlExpiresIn
Returns the pre-signed URL expiration time in seconds, if provided.- Returns:
- the pre-signed URL expiration time in seconds, if provided.
-
getPageSizeType
Returns the requested page size preset.- Returns:
- the requested page size preset.
-
getWidth
Returns the custom page width in pixels, if provided.- Returns:
- the custom page width in pixels, if provided.
-
getHeight
Returns the custom page height in pixels, if provided.- Returns:
- the custom page height in pixels, if provided.
-
getOrientation
Returns the page orientation, if provided.- Returns:
- the page orientation, if provided.
-
getHeader
Returns the HTML header applied to each page, if provided.- Returns:
- the HTML header applied to each page, if provided.
-
getMargin
Returns the page margins, if provided.- Returns:
- the page margins, if provided.
-
getTimeout
Returns the timeout in milliseconds for the render, if provided.- Returns:
- the timeout in milliseconds for the render, if provided.
-
getJavascript
Returns JavaScript to run before rendering, if provided.- Returns:
- JavaScript to run before rendering, if provided.
-
getCss
Returns additional CSS to apply during rendering, if provided.- Returns:
- additional CSS to apply during rendering, if provided.
-
getEmulateMediaType
Returns the CSS media type to emulate during rendering, if provided.- Returns:
- the CSS media type to emulate during rendering, if provided.
-
getHttpHeaders
Returns custom HTTP headers applied when loading the target URL, if provided.- Returns:
- custom HTTP headers applied when loading the target URL, if provided.
-
getMetadata
Returns metadata to attach to the generated document, if provided.- Returns:
- metadata to attach to the generated document, if provided.
-
getWaitForSelector
Returns the selector to wait for before rendering, if provided.- Returns:
- the selector to wait for before rendering, if provided.
-
getClickSelector
Returns the selector to click before rendering, if provided.- Returns:
- the selector to click before rendering, if provided.
-
getClickSelectorChainSetup
Returns click chain setup used before rendering, if provided.- Returns:
- click chain setup used before rendering, if provided.
-
getWaitForNetworkIdle
Returns whether to wait for network idle before rendering, if provided.- Returns:
- whether to wait for network idle before rendering, if provided.
-
getEnableFormFields
Returns whether interactive form fields should be enabled, if provided.- Returns:
- whether interactive form fields should be enabled, if provided.
-
getDelay
Returns the delay in milliseconds before rendering, if provided.- Returns:
- the delay in milliseconds before rendering, if provided.
-
getLoadImages
Returns whether images must load before rendering, if provided.- Returns:
- whether images must load before rendering, if provided.
-
getScale
Returns the scale factor applied during rendering, if provided.- Returns:
- the scale factor applied during rendering, if provided.
-
getPageRanges
Returns the page ranges to include, if provided.- Returns:
- the page ranges to include, if provided.
-
getPrintBackground
Returns whether to print background graphics, if provided.- Returns:
- whether to print background graphics, if provided.
-
getUserAgent
Returns the custom user agent string, if provided.- Returns:
- the custom user agent string, if provided.
-
getAuthentication
Returns authentication credentials for protected content, if provided.- Returns:
- authentication credentials for protected content, if provided.
-
getViewport
Returns the viewport size for rendering, if provided.- Returns:
- the viewport size for rendering, if provided.
-