public static class HTML2PDF.WebPageSettings
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
e_abort
The Constant e_abort.
|
static int |
e_ignore
The Constant e_abort.
|
static int |
e_skip
The Constant e_abort.
|
Constructor and Description |
---|
WebPageSettings()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Frees the native memory of the object.
|
void |
setAllowJavaScript(boolean enable)
Allow javascript from this web page to be run?
|
void |
setAllowPlugins(boolean enable)
Allow Netscape and flash plugins from this web page to
be run? Enabling will have limited success.
|
void |
setBlockLocalFileAccess(boolean block)
Allow local and piped files access to other local files?
|
void |
setDebugJavaScriptOutput(boolean forward)
Forward javascript warnings and errors to the HTML2PDF warning callback?
|
void |
setDefaultEncoding(java.lang.String encoding)
Default encoding to be used when not specified by the web page.
|
void |
setExternalLinks(boolean convert)
Convert external links in HTML document to external
PDF links?
|
void |
setIncludeInOutline(boolean include)
Add sections from this web page to the outline and
table of contents?
|
void |
setInternalLinks(boolean convert)
Should internal links in HTML document be converted
into PDF references?
|
void |
setJavaScriptDelay(int msec)
Amount of time to wait for a web page to start printing after
it's completed loading.
|
void |
setLoadErrorHandling(int type)
How to handle objects that failed to load?
|
void |
setLoadImages(boolean load)
Print the images of this web page?
|
void |
setMinimumFontSize(int size)
Set the smallest font size allowed, e.g 9.
|
void |
setPassword(java.lang.String password)
HTTP authentication password to use when logging into the website.
|
void |
setPrintBackground(boolean background)
Print the background of this web page?
|
void |
setPrintMediaType(boolean print)
Controls how content will be printed from this web page.
|
void |
setProduceForms(boolean forms)
Turn HTML forms into PDF forms?
|
void |
setProxy(HTML2PDF.Proxy proxy)
Use this proxy to load content from this web page.
|
void |
setSmartShrinking(boolean enable)
Allow intelligent shrinking to fit more content per page?
|
void |
setStopSlowScripts(boolean stop)
Stop slow running javascript's?
|
void |
setUsername(java.lang.String username)
HTTP authentication username to use when logging into the website.
|
void |
setUserStyleSheet(java.lang.String url)
Url or path to user specified style sheet.
|
void |
setZoom(double zoom)
Zoom factor to use when loading object.
|
public static final int e_abort
public static final int e_skip
public static final int e_ignore
public WebPageSettings() throws PDFNetException
PDFNetException
public void destroy()
public void setPrintBackground(boolean background) throws PDFNetException
background
- - If true background is printed.PDFNetException
public void setLoadImages(boolean load) throws PDFNetException
load
- - If true images are printed.PDFNetException
public void setAllowJavaScript(boolean enable) throws PDFNetException
enable
- - If true javascript's are allowed.PDFNetException
public void setSmartShrinking(boolean enable) throws PDFNetException
enable
- - If true intelligent shrinking is enabled and
the pixel/dpi ratio is non constant.PDFNetException
public void setMinimumFontSize(int size) throws PDFNetException
size
- - No fonts will appear smaller than this.PDFNetException
public void setDefaultEncoding(java.lang.String encoding) throws PDFNetException
Note: available encodings are Apple Roman, Big5, Big5-HKSCS, CP949, EUC-JP, EUC-KR, GB18030-0, IBM 850, IBM 866, IBM 874, ISO 2022-JP, ISO 8859-1 to 10, ISO 8859-13 to 16, Iscii-Bng, Dev, Gjr, Knd, Mlm, Ori, Pnj, Tlg, Tml, JIS X 0201, JIS X 0208, KOI8-R, KOI8-U, MuleLao-1, ROMAN8, Shift-JIS, TIS-620, TSCII, UTF-8, UTF-16, UTF-16BE, UTF-16LE, UTF-32, UTF-32BE, UTF-32LE, Windows-1250 to 1258, WINSAMI2.
encoding
- - Default encoding, e.g. utf-8 or iso-8859-1.PDFNetException
public void setUserStyleSheet(java.lang.String url) throws PDFNetException
url
- - URL or file path to user style sheet to be used
with this web page.PDFNetException
public void setAllowPlugins(boolean enable) throws PDFNetException
enable
- - If true Netscape & flash plugins will be run.PDFNetException
public void setPrintMediaType(boolean print) throws PDFNetException
print
- - If true the print media type will be used, otherwise
the screen media type will be used to print content.PDFNetException
public void setIncludeInOutline(boolean include) throws PDFNetException
include
- - If true PDF pages created from this web
page will show up in the outline, and table of contents,
otherwise, produced PDF pages will be excluded.PDFNetException
public void setUsername(java.lang.String username) throws PDFNetException
username
- - The login name to use with the server, e.g. "bart".PDFNetException
public void setPassword(java.lang.String password) throws PDFNetException
password
- - The login password to use with the server, e.g. "elbarto".PDFNetException
public void setJavaScriptDelay(int msec) throws PDFNetException
msec
- - Maximum wait time in milliseconds, e.g. 1200.PDFNetException
public void setZoom(double zoom) throws PDFNetException
zoom
- - How much to magnify the web content by, e.g. 2.2.PDFNetException
public void setBlockLocalFileAccess(boolean block) throws PDFNetException
block
- - If true local files will be inaccessible.PDFNetException
public void setStopSlowScripts(boolean stop) throws PDFNetException
stop
- - If true, slow running javascript's will be stopped.PDFNetException
public void setDebugJavaScriptOutput(boolean forward) throws PDFNetException
forward
- - If true javascript errors and warnings will be forwarded
to HTML2PDF error and warning callbacks. Use HTML2PDF::SetWarningProc
and SetErrorProc to get these messages when forward is true.PDFNetException
public void setLoadErrorHandling(int type) throws PDFNetException
type
- - If e_abort then conversion process is aborted, if
e_skip then the converter will not add this web page to the PDF
output, and if e_skip then the converter will try to add this
web page to the PDF output.PDFNetException
public void setExternalLinks(boolean convert) throws PDFNetException
convert
- - If true PDF pages produced from this web page
can have external links.PDFNetException
public void setInternalLinks(boolean convert) throws PDFNetException
convert
- - If true PDF pages produced from this web page
will have links to other PDF pages.PDFNetException
public void setProduceForms(boolean forms) throws PDFNetException
forms
- - If true PDF pages produced from this web page
will have PDF forms for any HTML forms the web page has.PDFNetException
public void setProxy(HTML2PDF.Proxy proxy) throws PDFNetException
proxy
- - Contains settings for proxyPDFNetException