Show / Hide Table of Contents

# Class Reflow

Reflow annotations between PDF and HTML

##### Inheritance

object
Reflow

##### Implements

IDisposable

##### 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 Reflow : IDisposable

### Constructors

#### Reflow(IntPtr)

##### Declaration

    public Reflow(IntPtr impl_ptr)

##### Parameters

Type | Name | Description
--- | --- | ---
IntPtr | impl_ptr |

### Methods

#### Destroy()

##### Declaration

    public void Destroy()

#### Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

##### Declaration

    public void Dispose()

#### Dispose(bool)

##### Declaration

    protected virtual void Dispose(bool disposing)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | disposing |

#### ~Reflow()

##### Declaration

    protected ~Reflow()

#### GetAnnot(string)

Gets PDF annotation(s) as JSON.

##### Declaration

    public string GetAnnot(string in_id)

##### Parameters

Type | Name | Description
--- | --- | ---
string | in_id | an annotation ID, or an empty string

##### Returns

Type | Description
--- | ---
string | returns JSON string

#### GetHtml()

Converts PDF to HTML.

##### Declaration

    public string GetHtml()

##### Returns

Type | Description
--- | ---
string | returns HTML as a string

#### SetAnnot(string)

Updates PDF annotation.

##### Declaration

    public string SetAnnot(string in_json)

##### Parameters

Type | Name | Description
--- | --- | ---
string | in_json | update instructions (JSON)

##### Returns

Type | Description
--- | ---
string | returns JSON string

#### SetCustomStyles(string)

##### Declaration

    public void SetCustomStyles(string styles)

##### Parameters

Type | Name | Description
--- | --- | ---
string | styles |

#### SetDoNotReflowTextOverImages(bool)

Determines whether to not reflow text that appears over images. Default is false.

##### Declaration

    public void SetDoNotReflowTextOverImages(bool do_not_reflow_text_over_images)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | do_not_reflow_text_over_images | if true, text that appears over images will not be included in the output HTML

#### SetFontOverrideName(string)

Overrides the font to use for reflowed content. If this property is empty, the default PDF font will be used. Default is no override.

##### Declaration

    public void SetFontOverrideName(string font_family)

##### Parameters

Type | Name | Description
--- | --- | ---
string | font_family | the font-family value that goes to the CSS in the output HTML

#### SetHTMLOutputTextMarkup(bool)

Determines whether to write text markup tags into the output HTML. Default is false.

##### Declaration

    public void SetHTMLOutputTextMarkup(bool include)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | include | if true text markup tags will be included in the output HTML.

#### SetHideBackgroundImages(bool)

Determines whether to hide background images. Default is false.

##### Declaration

    public void SetHideBackgroundImages(bool hide_background_images)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | hide_background_images | if true, background images will not be included in the output HTML

#### SetHideImagesUnderInvisibleText(bool)

Determines whether to hide images that are covered by invisible text (typically produced by OCR). Default is true.

This options works only if SetHideImagesUnderText() is set to false. If SetHideImagesUnderText() is set to true, then images that are covered by any text, whether visible or not, will not be included in the output HTML.

If SetHideImagesUnderInvisibleText() is set to true while SetHideImagesUnderText() is set to false, then images that are covered by invisible text will not be included in the output HTML. This can be useful when processing scanned documents that are processed by OCR.

##### Declaration

    public void SetHideImagesUnderInvisibleText(bool hide_images_under_invisible_text)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | hide_images_under_invisible_text | if true, images that are covered by invisible text will not be included in the output HTML

#### SetHideImagesUnderText(bool)

Determines whether to hide images that are covered by text. Default is false.

##### Declaration

    public void SetHideImagesUnderText(bool hide_images_under_text)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | hide_images_under_text | if true, images that are covered by text will not be included in the output HTML

#### SetIncludeBBoxForRecognizedZones(bool)

Determines whether to include bounding box information (of the original PDF) in the output HTML. Default is false.

The bounding box information will be stored using the attribute called "data-bbox" (value is written as "x1,y1,x2,y2", in PDF coordinates).

Note: This option is only available when pre-recognized zoning information is set through SetRecognizedZones().

##### Declaration

    public void SetIncludeBBoxForRecognizedZones(bool include)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | include | if true bounding box information will be included in the output HTML

#### SetIncludeImages(bool)

Determines whether to include images in the output HTML. Default is false.

##### Declaration

    public void SetIncludeImages(bool include)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | include | if true images will be included in the output HTML

#### SetMessageWhenNoReflowContent(string)

Sets the error message in the output HTML when the page doesn't contain reflowable text. Use it for localization purposes. Default: "This page doesn't contain reflowable text".

##### Declaration

    public void SetMessageWhenNoReflowContent(string content)

##### Parameters

Type | Name | Description
--- | --- | ---
string | content | the localized message

#### SetMessageWhenReflowFailed(string)

Sets the error message in the output HTML when reflow conversion fails. Use it for localization purposes. Default: "Could not reflow this page".

##### Declaration

    public void SetMessageWhenReflowFailed(string content)

##### Parameters

Type | Name | Description
--- | --- | ---
string | content | the localized message

### Implements

IDisposable