public static class

Convert.HTMLOutputOptions

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.Convert.HTMLOutputOptions

Class Overview

A class containing options common to ToHtml and ToEpub functions

Summary

Public Constructors
HTMLOutputOptions()
Creates an HTMLOutputCommonOptions object with default settings
Public Methods
void setDPI(int dpi)
The output resolution, from 1 to 1000, in Dots Per Inch (DPI) at which to render elements which cannot be directly converted.
void setExternalLinks(boolean enable)
Enable the conversion of external URL navigation.
void setInternalLinks(boolean enable)
Enable the conversion of internal document navigation.
void setJPGQuality(int quality)
Specifies the compression quality to use when generating JPEG images.
void setMaximumImagePixels(int max_pixels)
Specifies the maximum image slice size in pixels.
void setPreferJPG(boolean prefer_jpg)
Use JPG files rather than PNG.
void setReflow(boolean reflow)
Switch between fixed (pre-paginated) and reflowable HTML generation.
void setScale(double scale)
Set an overall scaling of the generated HTML pages.
void setSimplifyText(boolean enable)
Controls whether converter optimizes DOM or preserves text placement accuracy.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public HTMLOutputOptions ()

Creates an HTMLOutputCommonOptions object with default settings

Public Methods

public void setDPI (int 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
dpi the resolution in Dots Per Inch

public void setExternalLinks (boolean enable)

Enable the conversion of external URL navigation. Default is false.

Parameters
enable if true, links that specify external URL's are converted into HTML.

public void setInternalLinks (boolean enable)

Enable the conversion of internal document navigation. Default is false.

Parameters
enable if true, links that specify page jumps are converted into HTML.

public void setJPGQuality (int quality)

Specifies the compression quality to use when generating JPEG images.

Parameters
quality the JPEG compression quality, from 0(highest compression) to 100(best quality).

public void setMaximumImagePixels (int 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.

Parameters
max_pixels the maximum number of pixels an image can have

public void setPreferJPG (boolean prefer_jpg)

Use JPG files rather than PNG. This will apply to all generated images. Default is true.

Parameters
prefer_jpg if true JPG images will be used whenever possible.

public void setReflow (boolean reflow)

Switch between fixed (pre-paginated) and reflowable HTML generation. Default is false.

Parameters
reflow if true, generated HTML will be reflowable, otherwise, fixed positioning will be used

public void setScale (double scale)

Set an overall scaling of the generated HTML pages. Default is 1.0.

Parameters
scale 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.

public void setSimplifyText (boolean enable)

Controls whether converter optimizes DOM or preserves text placement accuracy. Default is false.

Parameters
enable If true, converter will try to reduce DOM complexity at the expense of text placement accuracy.