All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::PDF::WebPageSettings Class Reference

#include <HTML2PDF.h>

Public Types

enum  ErrorHandling { e_abort, e_skip, e_ignore }
 

Public Member Functions

 WebPageSettings ()
 
 ~WebPageSettings ()
 
void SetPrintBackground (bool background)
 
void SetLoadImages (bool load)
 
void SetAllowJavaScript (bool enable)
 
void SetSmartShrinking (bool enable)
 
void SetMinimumFontSize (int size)
 
void SetDefaultEncoding (const UString &encoding)
 
void SetUserStyleSheet (const UString &url)
 
void SetAllowPlugins (bool enable)
 
void SetPrintMediaType (bool print)
 
void SetIncludeInOutline (bool include)
 
void SetUsername (const UString &username)
 
void SetPassword (const UString &password)
 
void SetJavaScriptDelay (int msec)
 
void SetZoom (double zoom)
 
void SetBlockLocalFileAccess (bool block)
 
void SetStopSlowScripts (bool stop)
 
void SetDebugJavaScriptOutput (bool forward)
 
void SetLoadErrorHandling (ErrorHandling type)
 
void SetExternalLinks (bool convert)
 
void SetInternalLinks (bool convert)
 
void SetProduceForms (bool forms)
 
void SetProxy (const Proxy &proxy)
 
void Destroy ()
 

Detailed Description

Settings that control how a web page is opened and converted to PDF.

Definition at line 406 of file HTML2PDF.h.

Member Enumeration Documentation

How to handle objects that failed to load.

Parameters
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.
Enumerator
e_abort 
e_skip 
e_ignore 

Definition at line 564 of file HTML2PDF.h.

Constructor & Destructor Documentation

pdftron::PDF::WebPageSettings::WebPageSettings ( )

Default constructor

pdftron::PDF::WebPageSettings::~WebPageSettings ( )

Destructor

Member Function Documentation

void pdftron::PDF::WebPageSettings::Destroy ( )

Frees the native memory of the object.

void pdftron::PDF::WebPageSettings::SetAllowJavaScript ( bool  enable)

Allow javascript from this web page to be run.

Parameters
enable- If true javascript's are allowed.
void pdftron::PDF::WebPageSettings::SetAllowPlugins ( bool  enable)

Allow Netscape and flash plugins from this web page to be run. Enabling will have limited success.

Parameters
enable- If true Netscape & flash plugins will be run.
void pdftron::PDF::WebPageSettings::SetBlockLocalFileAccess ( bool  block)

Allow local and piped files access to other local files.

Parameters
block- If true local files will be inaccessible.
void pdftron::PDF::WebPageSettings::SetDebugJavaScriptOutput ( bool  forward)

Forward javascript warnings and errors to output.

Parameters
forward- If true javascript errors and warnings will be forwarded to stdout and the log.
void pdftron::PDF::WebPageSettings::SetDefaultEncoding ( const UString encoding)

Default encoding to be used when not specified by the web page.

Parameters
encoding- Default encoding, e.g. utf-8 or iso-8859-1.
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.
void pdftron::PDF::WebPageSettings::SetExternalLinks ( bool  convert)

Convert external links in HTML document to external PDF links.

Parameters
convert- If true PDF pages produced from this web page can have external links.
void pdftron::PDF::WebPageSettings::SetIncludeInOutline ( bool  include)

Add sections from this web page to the outline and table of contents.

Parameters
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.
void pdftron::PDF::WebPageSettings::SetInternalLinks ( bool  convert)

Convert internal links in HTML document into PDF references.

Parameters
convert- If true PDF pages produced from this web page will have links to other PDF pages.
void pdftron::PDF::WebPageSettings::SetJavaScriptDelay ( int  msec)

Amount of time to wait for a web page to start printing after it's completed loading. Converter will wait a maximum of msec milliseconds for javascript to call window.print().

Parameters
msec- Maximum wait time in milliseconds, e.g. 1200.
void pdftron::PDF::WebPageSettings::SetLoadErrorHandling ( ErrorHandling  type)
void pdftron::PDF::WebPageSettings::SetLoadImages ( bool  load)

Print the images of this web page.

Parameters
load- If true images are printed.
void pdftron::PDF::WebPageSettings::SetMinimumFontSize ( int  size)

Set the smallest font size allowed, e.g 9.

Parameters
size- No fonts will appear smaller than this.
void pdftron::PDF::WebPageSettings::SetPassword ( const UString password)

HTTP authentication password to use when logging into the website.

Parameters
password- The login password to use with the server, e.g. "elbarto".
void pdftron::PDF::WebPageSettings::SetPrintBackground ( bool  background)

Print the background of this web page.

Parameters
background- If true background is printed.
void pdftron::PDF::WebPageSettings::SetPrintMediaType ( bool  print)

Controls how content will be printed from this web page.

Parameters
print- If true the print media type will be used, otherwise the screen media type will be used to print content.
void pdftron::PDF::WebPageSettings::SetProduceForms ( bool  forms)

Turn HTML forms into PDF forms.

Parameters
forms- If true PDF pages produced from this web page will have PDF forms for any HTML forms the web page has.
void pdftron::PDF::WebPageSettings::SetProxy ( const Proxy proxy)

Use this proxy to load content from this web page.

Parameters
proxy- Contains settings for proxy
void pdftron::PDF::WebPageSettings::SetSmartShrinking ( bool  enable)

Allow intelligent shrinking to fit more content per page.

Parameters
enable- If true intelligent shrinking is enabled and the pixel/dpi ratio is non constant.
void pdftron::PDF::WebPageSettings::SetStopSlowScripts ( bool  stop)

Stop slow running javascript's.

Parameters
stop- If true, slow running javascript's will be stopped.
void pdftron::PDF::WebPageSettings::SetUsername ( const UString username)

HTTP authentication username to use when logging into the website.

Parameters
username- The login name to use with the server, e.g. "bart".
void pdftron::PDF::WebPageSettings::SetUserStyleSheet ( const UString url)

Url or path to user specified style sheet.

Parameters
url- URL or file path to user style sheet to be used with this web page.
void pdftron::PDF::WebPageSettings::SetZoom ( double  zoom)

Zoom factor to use when loading object.

Parameters
zoom- How much to magnify the web content by, e.g. 2.2.

The documentation for this class was generated from the following file: