All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::PDF::Reflow Class Reference

#include <Reflow.h>

Public Member Functions

 Reflow ()
 
 Reflow (const Reflow &other)
 
 Reflow (TRN_Reflow impl)
 
Reflowoperator= (const Reflow &other)
 
 ~Reflow ()
 
void Destroy ()
 
UString GetHtml ()
 
UString GetAnnot (UString in_id)
 
UString SetAnnot (UString in_json)
 
void SetIncludeImages (bool include)
 
void SetHTMLOutputTextMarkup (bool include)
 
void SetMessageWhenNoReflowContent (UString content)
 
void SetMessageWhenReflowFailed (UString content)
 
void SetHideBackgroundImages (bool hide_background_images)
 
void SetHideImagesUnderText (bool hide_images_under_text)
 
void SetHideImagesUnderInvisibleText (bool hide_images_under_invisible_text)
 
void SetDoNotReflowTextOverImages (bool do_not_reflow_text_over_images)
 
void SetFontOverrideName (UString font_family)
 
void SetCustomStyles (UString styles)
 
void SetIncludeBBoxForRecognizedZones (bool include)
 

Public Attributes

TRN_Reflow m_impl
 

Detailed Description

The class Reflow. Reflow annotations between PDF and HTML

DocumentConversion instances are created through methods belonging to the Convert class. See Convert.CreateReflow for an example.

Definition at line 26 of file Reflow.h.

Constructor & Destructor Documentation

pdftron::PDF::Reflow::Reflow ( )
pdftron::PDF::Reflow::Reflow ( const Reflow other)
pdftron::PDF::Reflow::Reflow ( TRN_Reflow  impl)
pdftron::PDF::Reflow::~Reflow ( )

Member Function Documentation

void pdftron::PDF::Reflow::Destroy ( )
UString pdftron::PDF::Reflow::GetAnnot ( UString  in_id)

Gets PDF annotation(s) as JSON.

Parameters
in_id– an annotation ID, or an empty string.
Returns
returns JSON string.
UString pdftron::PDF::Reflow::GetHtml ( )

Converts PDF to HTML.

Returns
returns HTML as a string.
Reflow& pdftron::PDF::Reflow::operator= ( const Reflow other)
UString pdftron::PDF::Reflow::SetAnnot ( UString  in_json)

Updates PDF annotation.

Parameters
in_json– update instructions (JSON).
Returns
returns JSON string.
void pdftron::PDF::Reflow::SetCustomStyles ( UString  styles)

Appends custom CSS styles to the output HTML. Default is no custom styles.

Parameters
styles– the CSS code without any <style> tags to be inserted in the output HTML.
void pdftron::PDF::Reflow::SetDoNotReflowTextOverImages ( bool  do_not_reflow_text_over_images)

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

Parameters
do_not_reflow_text_over_images– if true, text that appears over images will not be included in the output HTML.
void pdftron::PDF::Reflow::SetFontOverrideName ( UString  font_family)

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

Parameters
font_family– the font-family value that goes to the CSS in the output HTML.
void pdftron::PDF::Reflow::SetHideBackgroundImages ( bool  hide_background_images)

Determines whether to hide background images. Default is false.

Parameters
hide_background_images– if true, background images will not be included in the output HTML.
void pdftron::PDF::Reflow::SetHideImagesUnderInvisibleText ( bool  hide_images_under_invisible_text)

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.

Parameters
hide_images_under_invisible_text– if true, images that are covered by invisible text will not be included in the output HTML.
void pdftron::PDF::Reflow::SetHideImagesUnderText ( bool  hide_images_under_text)

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

Parameters
hide_images_under_text– if true, images that are covered by text will not be included in the output HTML.
void pdftron::PDF::Reflow::SetHTMLOutputTextMarkup ( bool  include)

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

Parameters
include– if true text markup tags will be included in the output HTML..
void pdftron::PDF::Reflow::SetIncludeBBoxForRecognizedZones ( bool  include)

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().

Parameters
include– if true bounding box information will be included in the output HTML.
void pdftron::PDF::Reflow::SetIncludeImages ( bool  include)

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

Parameters
include– if true images will be included in the output HTML.
void pdftron::PDF::Reflow::SetMessageWhenNoReflowContent ( UString  content)

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".

Parameters
content– the localized message.
void pdftron::PDF::Reflow::SetMessageWhenReflowFailed ( UString  content)

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

Parameters
content– the localized message.

Member Data Documentation

TRN_Reflow pdftron::PDF::Reflow::m_impl

Definition at line 151 of file Reflow.h.


The documentation for this class was generated from the following file: