public class HtmlToPdfObject
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
HtmlToPdfObject |
authPassword(java.lang.String password)
The auth password to use when requesting the webpage.
|
HtmlToPdfObject |
authUsername(java.lang.String username)
The auth username to use when requesting the webpage.
|
HtmlToPdfObject |
blockLocalFileAccess(boolean block)
Whether or not to block the webpage from accessing local file access.
|
HtmlToPdfObject |
convertInternalLinksToPdfReferences(boolean convert)
Whether or not to convert links within the webpage to PDF references.
|
HtmlToPdfObject |
debugJavascriptWarningsAndErrors(boolean debug)
Whether or not to debug javascript warnings and errors.
|
HtmlToPdfObject |
defaultEncoding(java.lang.String encoding)
The character encoding to use when not specified by the webpage (e.g.
|
HtmlToPdfObject |
enableIntelligentShrinking(boolean enable)
Whether or not to enable Intelligent Shrinking.
|
HtmlToPdfObject |
enableJavascript(boolean enable)
Whether or not to enable javascript.
|
static HtmlToPdfObject |
forHtml(java.lang.String html)
Creates a new
HtmlToPdfObject using the specified HTML as content. |
static HtmlToPdfObject |
forUrl(java.lang.String url)
Creates a new
HtmlToPdfObject for the specified URL. |
HtmlToPdfObject |
handleErrors(ObjectErrorHandling errorHandling)
Specifies the way in which errors are handled for this object.
|
HtmlToPdfObject |
headerCenter(java.lang.String text)
Text to write in the center part of the header.
|
HtmlToPdfObject |
headerFontName(java.lang.String fontName)
The font name of the custom header to add.
|
HtmlToPdfObject |
headerFontSize(int size)
The font size of the custom header to add.
|
HtmlToPdfObject |
headerHtmlUrl(java.lang.String url)
URL for an HTML document to use for the header.
|
HtmlToPdfObject |
headerLeft(java.lang.String text)
Text to write in the left part of the header.
|
HtmlToPdfObject |
headerLine(boolean line)
Whether or not to add a line beneath the custom header.
|
HtmlToPdfObject |
headerRight(java.lang.String text)
Text to write in the right part of the header.
|
HtmlToPdfObject |
headerSpacing(int spacing)
The amount of spacing between the header and the content.
|
HtmlToPdfObject |
javascriptDelay(int delayMs)
Delay, in milliseconds, to allow between the time when the page has been
loaded and the time of conversion to PDF.
|
HtmlToPdfObject |
loadImages(boolean load)
Whether or not to load images.
|
HtmlToPdfObject |
minimumFontSize(int size)
The minimum font size allowed.
|
HtmlToPdfObject |
pageCount(boolean pageCount)
Whether or not to include page count in the header, footer, and table of contents.
|
HtmlToPdfObject |
produceForms(boolean produce)
Whether or not to turn HTML forms into PDF forms.
|
HtmlToPdfObject |
showBackground(boolean background)
Whether or not to show the page's background.
|
HtmlToPdfObject |
stopSlowScript(boolean stop)
Whether or not to stop slow running javascript.
|
HtmlToPdfObject |
tableOfContentsBackLinks(boolean backLinks)
Whether or not content should link back to the table of contents.
|
HtmlToPdfObject |
tableOfContentsCaptionText(java.lang.String captionText)
The caption text to use for the table of contents.
|
HtmlToPdfObject |
tableOfContentsDottedLines(boolean dottedLines)
Whether or not to use dotted lines for the table of contents.
|
HtmlToPdfObject |
tableOfContentsForwardLinks(boolean forward)
Whether or not the table of contents should link to the content in the PDF document.
|
HtmlToPdfObject |
tableOfContentsIncludeSections(boolean include)
Whether or not sections from the document should be included in the outline of the
table of contents.
|
HtmlToPdfObject |
tableOfContentsIndentation(java.lang.String indentation)
The indentation to use for the table of contents.
|
HtmlToPdfObject |
tableOfContentsIndentationFontScaleDown(float scale)
The scale-down per indentation of the table of contents.
|
HtmlToPdfObject |
useExternalLinks(boolean use)
Whether or not to keep external links.
|
HtmlToPdfObject |
usePrintMediaType(boolean use)
Whether or not to use "print" media type (instead of "screen" media type) for CSS styles.
|
HtmlToPdfObject |
userStylesheet(java.lang.String urlOrPath)
A stylesheet to apply for the conversion.
|
HtmlToPdfObject |
zoomFactor(float factor)
Amount of zoom to use when converting.
|
public static HtmlToPdfObject forHtml(java.lang.String html)
HtmlToPdfObject using the specified HTML as content.html - The HTML code to convert to PDF.HtmlToPdfObject instance.public static HtmlToPdfObject forUrl(java.lang.String url)
HtmlToPdfObject for the specified URL. The content will be
obtained from the specified URL during the conversion process.url - The URL to obtain HTML content from.HtmlToPdfObject instance.public HtmlToPdfObject showBackground(boolean background)
public HtmlToPdfObject loadImages(boolean load)
public HtmlToPdfObject enableJavascript(boolean enable)
public HtmlToPdfObject enableIntelligentShrinking(boolean enable)
public HtmlToPdfObject minimumFontSize(int size)
public HtmlToPdfObject usePrintMediaType(boolean use)
public HtmlToPdfObject defaultEncoding(java.lang.String encoding)
public HtmlToPdfObject userStylesheet(java.lang.String urlOrPath)
urlOrPath - The URL or path to the stylesheet to apply.public HtmlToPdfObject authUsername(java.lang.String username)
public HtmlToPdfObject authPassword(java.lang.String password)
public HtmlToPdfObject javascriptDelay(int delayMs)
public HtmlToPdfObject zoomFactor(float factor)
public HtmlToPdfObject blockLocalFileAccess(boolean block)
public HtmlToPdfObject stopSlowScript(boolean stop)
public HtmlToPdfObject debugJavascriptWarningsAndErrors(boolean debug)
HtmlToPdf
warning callback.HtmlToPdf.warning(Consumer)public HtmlToPdfObject handleErrors(ObjectErrorHandling errorHandling)
public HtmlToPdfObject headerFontSize(int size)
public HtmlToPdfObject headerFontName(java.lang.String fontName)
public HtmlToPdfObject headerLine(boolean line)
public HtmlToPdfObject headerSpacing(int spacing)
public HtmlToPdfObject headerHtmlUrl(java.lang.String url)
public HtmlToPdfObject headerLeft(java.lang.String text)
public HtmlToPdfObject headerCenter(java.lang.String text)
public HtmlToPdfObject headerRight(java.lang.String text)
public HtmlToPdfObject tableOfContentsDottedLines(boolean dottedLines)
public HtmlToPdfObject tableOfContentsCaptionText(java.lang.String captionText)
public HtmlToPdfObject tableOfContentsForwardLinks(boolean forward)
public HtmlToPdfObject tableOfContentsBackLinks(boolean backLinks)
public HtmlToPdfObject tableOfContentsIndentation(java.lang.String indentation)
public HtmlToPdfObject tableOfContentsIndentationFontScaleDown(float scale)
0.8 will scale the font down by 20% for every level in the table of contents.public HtmlToPdfObject tableOfContentsIncludeSections(boolean include)
public HtmlToPdfObject useExternalLinks(boolean use)
public HtmlToPdfObject convertInternalLinksToPdfReferences(boolean convert)
public HtmlToPdfObject produceForms(boolean produce)
public HtmlToPdfObject pageCount(boolean pageCount)