Show / Hide Table of Contents

# Class Convert.HTMLOutputOptions

A class containing options for PDF to HTML conversion

##### Inheritance

object
Convert.HTMLOutputOptions

##### Inherited Members

object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### Namespace: pdftron.PDF

###### Assembly: PDFTronDotNet.dll

##### Syntax

    public class Convert.HTMLOutputOptions

### Constructors

#### HTMLOutputOptions()

Creates an HTMLOutputOptions object with default settings

##### Declaration

    public HTMLOutputOptions()

### Methods

#### GetFootnotesSetting()

Get the setting for footnotes from this options object. Note: This option is only available for e_reflow_full mode.

##### Declaration

    public Convert.StructuredOutputOptions.SectionConversionSetting GetFootnotesSetting()

##### Returns

Type | Description
--- | ---
Convert.StructuredOutputOptions.SectionConversionSetting | The current footnote setting.

#### GetHeadersAndFootersSetting()

Get the setting for headers and footers from this options object. Note: This option is only available for e_reflow_full mode.

##### Declaration

    public Convert.StructuredOutputOptions.SectionConversionSetting GetHeadersAndFootersSetting()

##### Returns

Type | Description
--- | ---
Convert.StructuredOutputOptions.SectionConversionSetting | The current header and footer setting.

#### SetConnectHyphens(bool)

Specifies whether hyphens in the PDF should be connected. Default is false. Note: This option is only available for e_reflow_paragraphs and e_reflow_full modes.

##### Declaration

    public void SetConnectHyphens(bool connect)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | connect | if true, hyphens in the PDF will be connected.

#### SetContentReflowSetting(ContentReflowSetting)

Switch between fixed (pre-paginated) and reflowable HTML generation. Default is e_fixed_position. In e_reflow_paragraphs mode (now deprecated), conversions require that the optional PDFTron HTML reflow paragraphs add-on module is available. In e_reflow_full mode, conversions require that the optional PDFTron StructuredOutput add-on module is available. See also: the `StructuredOutputModule` class and the `PDF2HtmlReflowParagraphsModule` class

##### Declaration

    public void SetContentReflowSetting(Convert.HTMLOutputOptions.ContentReflowSetting reflow)

##### Parameters

Type | Name | Description
--- | --- | ---
Convert.HTMLOutputOptions.ContentReflowSetting | reflow | the generated HTML will be either fixed or reflowable.

#### SetDPI(uint)

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.

##### Declaration

    public void SetDPI(uint dpi)

##### Parameters

Type | Name | Description
--- | --- | ---
uint | dpi | the resolution in Dots Per Inch

#### SetDisableVerticalSplit(bool)

Specifies whether to disable the detection of section columns. Default is false. Enable this if your tables are coming out as section columns. Note: This option is only available for e_reflow_paragraphs mode. In e_reflow_full mode, columns are detected automatically.

##### Declaration

    public void SetDisableVerticalSplit(bool disable)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | disable | if true, the detection of section columns are disabled.

#### SetEmbedImages(bool)

Specifies whether images are embedded in the HTML without having to link to external files. Default is true. Note: This option is only available for e_reflow_paragraphs and e_reflow_full modes.

##### Declaration

    public void SetEmbedImages(bool embed)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | embed | if true, images are embedd in the HTML, otherwise, images are saved as external files.

#### SetExternalLinks(bool)

Enable the conversion of external URL navigation. Default is false. Note: This option is only available for e_fixed_position mode.

##### Declaration

    public void SetExternalLinks(bool enable)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | enable | if true, links that specify external URL's are converted into HTML.

#### SetFileConversionTimeoutSeconds(int)

Specifies the amount of time in seconds after which the conversion fails. Default is 300. Very long files need more time to convert. Note: This option is only available for e_reflow_paragraphs mode. The timeout feature is not necessary in other modes.

##### Declaration

    public void SetFileConversionTimeoutSeconds(int seconds)

##### Parameters

Type | Name | Description
--- | --- | ---
int | seconds | the timeout in seconds.

#### SetFootnotesSetting(SectionConversionSetting)

Specifies how footnotes should be converted. Default is e_Recover, which will include them as footnotes. Note: This option is only available for e_reflow_full mode.

##### Declaration

    public void SetFootnotesSetting(Convert.StructuredOutputOptions.SectionConversionSetting option)

##### Parameters

Type | Name | Description
--- | --- | ---
Convert.StructuredOutputOptions.SectionConversionSetting | option | The footnotes setting.

#### SetHeadersAndFootersSetting(SectionConversionSetting)

Specifies how header and footers should be converted. Default is e_Recover, which will include them as headers and footers. Note: This option is only available for e_reflow_full mode.

##### Declaration

    public void SetHeadersAndFootersSetting(Convert.StructuredOutputOptions.SectionConversionSetting option)

##### Parameters

Type | Name | Description
--- | --- | ---
Convert.StructuredOutputOptions.SectionConversionSetting | option | The header and footer setting.

#### SetImageDPI(uint)

Specifies the output image resolution, from 8 to 600, in Pixels Per Inch (PPI). The higher the PPI, the larger the image. Default is 192. Note: This option is only available for e_reflow_paragraphs mode. In other modes, image resolution is determined automatically for an optimal result.

##### Declaration

    public void SetImageDPI(uint dpi)

##### Parameters

Type | Name | Description
--- | --- | ---
uint | dpi | the resolution in Pixels Per Inch.

#### SetInternalLinks(bool)

Enable the conversion of internal document navigation. Default is false. Note: This option is only available for e_fixed_position mode.

##### Declaration

    public void SetInternalLinks(bool enable)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | enable | if true, links that specify page jumps are converted into HTML.

#### SetJPGQuality(uint)

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.

##### Declaration

    public void SetJPGQuality(uint quality)

##### Parameters

Type | Name | Description
--- | --- | ---
uint | quality | the JPEG compression quality, from 0 (highest compression) to 100 (best quality).

#### SetLanguage(LanguageChoice)

Specifies the OCR language. Default is automatic language detection. Note: This option is only available for e_reflow_full mode.

##### Declaration

    public void SetLanguage(Convert.OutputOptionsOCR.LanguageChoice language)

##### Parameters

Type | Name | Description
--- | --- | ---
Convert.OutputOptionsOCR.LanguageChoice | language | the OCR language.

#### SetMaximumImagePixels(uint)

Specifies the maximum image size in pixels. Default is 2000000. Note: This option is only available for e_fixed_position mode.

##### Declaration

    public void SetMaximumImagePixels(uint max_pixels)

##### Parameters

Type | Name | Description
--- | --- | ---
uint | max_pixels | the maximum number of pixels an image can have

#### SetNoPageWidth(bool)

Determines whether to flow contents across the entire browser window. Default is false. Note: This option is only available for e_reflow_paragraphs mode. In e_reflow_full mode, content always flows across the entire browser window.

##### Declaration

    public void SetNoPageWidth(bool enable)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | enable | if true, content will flow across entire page.

#### SetPDFPassword(string)

Specifies the password if the PDF requires one. Note: This option is only available for e_reflow_paragraphs and e_reflow_full modes.

##### Declaration

    public void SetPDFPassword(string password)

##### Parameters

Type | Name | Description
--- | --- | ---
string | password | the PDF password, if required; an empty string otherwise.

#### SetPages(int, int)

Specifies a range of pages to be converted. By default all pages are converted. The first page has the page number of 1. Note: This option is only available for e_reflow_paragraphs and e_reflow_full modes.

##### Declaration

    public void SetPages(int page_from, int page_to)

##### Parameters

Type | Name | Description
--- | --- | ---
int | page_from | the first page to be converted.
int | page_to | the last page to be converted (inclusive). Use a negative value to specify the last page in the PDF.

#### SetPreferJPG(bool)

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.

##### Declaration

    public void SetPreferJPG(bool prefer_jpg)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | prefer_jpg | if true JPG images will be used whenever possible

#### SetPreferredOCREngine(PreferredOCREngine)

Specifies the preferred OCR engine. Note: This option is only available for e_reflow_full mode.

##### Declaration

    public void SetPreferredOCREngine(Convert.OutputOptionsOCR.PreferredOCREngine engine)

##### Parameters

Type | Name | Description
--- | --- | ---
Convert.OutputOptionsOCR.PreferredOCREngine | engine | the preferred OCR engine.

#### SetReportFile(string)

Generate a XML file that contains additional information about the conversion process. By default no report is generated. Note: This option is only available for e_fixed_position mode.

##### Declaration

    public void SetReportFile(string path)

##### Parameters

Type | Name | Description
--- | --- | ---
string | path | the file path to which the XML report is written to.

#### SetScale(double)

Set an overall scaling of the generated HTML pages. Default is 1.0. Note: This option is only available for e_fixed_position mode.

##### Declaration

    public void SetScale(double scale)

##### Parameters

Type | Name | Description
--- | --- | ---
double | 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.

#### SetSearchableImageSetting(SearchableImageSetting)

Specifies how scanned image pages should be converted. Default is e_ocr_image_text. Note: This option is only available for e_reflow_paragraphs and e_reflow_full modes.

##### Declaration

    public void SetSearchableImageSetting(Convert.HTMLOutputOptions.SearchableImageSetting setting)

##### Parameters

Type | Name | Description
--- | --- | ---
Convert.HTMLOutputOptions.SearchableImageSetting | setting | the searchable image setting.

##### Remarks

In e_reflow_paragraphs mode, this feature does not perform OCR, but instead it relies on pre-existing text from previous OCR. Both images and pre-existing hidden text are kept by default. In e_reflow_full mode, pre-existing OCRed content is ignored and a new OCR is performed from scratch by default. e_ocr_off can be used to disable OCR.

#### SetSimpleLists(bool)

Determines whether to use <LI> tags for list items. Default is false. Note: This option is only available for e_reflow_paragraphs mode. In e_reflow_full mode, list items always use <LI> tags.

##### Declaration

    public void SetSimpleLists(bool enable)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | enable | if true, <LI> tags are used for list items.

#### SetSimplifyText(bool)

Controls whether converter optimizes DOM or preserves text placement accuracy. Default is false. Note: This option is only available for e_fixed_position mode.

##### Declaration

    public void SetSimplifyText(bool enable)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | enable | if true, converter will try to reduce DOM complexity at the expense of text placement accuracy.

#### SetTextRecoveryNSE(bool)

Specifies whether to use OCR in order to automatically recover text with a non-standard encoding. Default is true. Note: This option is only available for e_reflow_full mode. Note: This option should only be used by customers who are already familiar with the Solid Documents SDK from being a customer, or if they have been advised by support.

##### Declaration

    public void SetTextRecoveryNSE(bool use_ocr)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | use_ocr | If true, problem characters are automatically recovered using OCR. If false, no automatic repair is performed.

#### SetTitle(string)

Specifies the title for the output HTML. Note: This option is only available for e_reflow_paragraphs mode. HTML titles are not supported in other modes at the moment.

##### Declaration

    public void SetTitle(string title)

##### Parameters

Type | Name | Description
--- | --- | ---
string | title | the title of the output HTML.