Class: HTMLOutputOptions

PDFNet.Convert. HTMLOutputOptions


new HTMLOutputOptions()

An object containing options common to ToHtml and ToEpub functions

Methods


setDPI(dpi)

The output resolution, from 1 to 1000, in Dots Per Inch (DPI) at which to render elements which cannot be directly converted. Default is 140.
Parameters:
Name Type Description
dpi number the resolution in Dots Per Inch
Returns:
this object, for call chaining
Type
PDFNet.Convert.HTMLOutputOptions

Enable the conversion of external URL navigation. Default is false.
Parameters:
Name Type Description
enable boolean if true, links that specify external URL's are converted into HTML.
Returns:
this object, for call chaining
Type
PDFNet.Convert.HTMLOutputOptions

Enable the conversion of internal document navigation. Default is false.
Parameters:
Name Type Description
enable boolean if true, links that specify page jumps are converted into HTML.
Returns:
this object, for call chaining
Type
PDFNet.Convert.HTMLOutputOptions

setJPGQuality(quality)

Specifies the compression quality to use when generating JPEG images.
Parameters:
Name Type Description
quality number the JPEG compression quality, from 0(highest compression) to 100(best quality).
Returns:
this object, for call chaining
Type
PDFNet.Convert.HTMLOutputOptions

setMaximumImagePixels(max_pixels)

Specifies the maximum image slice size in pixels. Default is 2000000.
Parameters:
Name Type Description
max_pixels number the maximum number of pixels an image can have
Returns:
this object, for call chaining
Type
PDFNet.Convert.HTMLOutputOptions

setPreferJPG(prefer_jpg)

Use JPG files rather than PNG. This will apply to all generated images. Default is true.
Parameters:
Name Type Description
prefer_jpg boolean if true JPG images will be used whenever possible.
Returns:
this object, for call chaining
Type
PDFNet.Convert.HTMLOutputOptions

setReflow(reflow)

Switch between fixed (pre-paginated) and reflowable HTML generation. Default is false.
Parameters:
Name Type Description
reflow boolean if true, generated HTML will be reflowable, otherwise, fixed positioning will be used
Returns:
this object, for call chaining
Type
PDFNet.Convert.HTMLOutputOptions

setReportFile(path)

Generate a XML file that contains additional information about the conversion process. By default no report is generated.
Parameters:
Name Type Description
path string The file path to which the XML report is written to.
Returns:
this object, for call chaining
Type
PDFNet.Convert.HTMLOutputOptions

setScale(scale)

Set an overall scaling of the generated HTML pages. Default is 1.0.
Parameters:
Name Type Description
scale number a number greater than 0 which is used as a scale factor. For example, calling SetScale(0.5) will reduce the HTML body of the page to half its original size, whereas SetScale(2) will double the HTML body dimensions of the page and will rescale all page content appropriately.
Returns:
this object, for call chaining
Type
PDFNet.Convert.HTMLOutputOptions

setSimplifyText(enable)

Controls whether converter optimizes DOM or preserves text placement accuracy. Default is false.
Parameters:
Name Type Description
enable boolean If true, converter will try to reduce DOM complexity at the expense of text placement accuracy.
Returns:
this object, for call chaining
Type
PDFNet.Convert.HTMLOutputOptions