Class: HTMLOutputOptions

Core.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. Note: This option is only available for e_fixed_position mode.
Parameters:
Name Type Description
dpi number the resolution in Dots Per Inch
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.HTMLOutputOptions

Enable the conversion of external URL navigation. Default is false. Note: This option is only available for e_fixed_position mode.
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
Core.PDFNet.Convert.HTMLOutputOptions

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

setJPGQuality(quality)

Specifies the compression quality to use when generating JPEG images. Note: This option is only available for e_fixed_position and e_reflow_paragraphs modes. In e_reflow_full mode, the optimal JPEG quality is chosen automatically for best balance between size and quality.
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
Core.PDFNet.Convert.HTMLOutputOptions

setMaximumImagePixels(max_pixels)

Specifies the maximum image slice size in pixels. Default is 2000000. Note: This setting now will no longer reduce the total number of image pixels. Instead a lower value will just produce more slices and vice versa. Note: Since image compression works better with more pixels a larger max pixels should generally create smaller files. Note: This option is only available for e_fixed_position mode.
Parameters:
Name Type Description
max_pixels number the maximum number of pixels an image can have
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.HTMLOutputOptions

setPreferJPG(prefer_jpg)

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

setScale(scale)

Set an overall scaling of the generated HTML pages. Default is 1.0. Note: This option is only available for e_fixed_position mode.
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
Core.PDFNet.Convert.HTMLOutputOptions

setSimplifyText(enable)

Controls whether converter optimizes DOM or preserves text placement accuracy. Default is false. Note: This option is only available for e_fixed_position mode.
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
Core.PDFNet.Convert.HTMLOutputOptions