public class

Reflow

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.Reflow

Class Overview

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.

Summary

Public Constructors
Reflow(long impl_ptr)
Public Methods
long __GetHandle()
void destroy()
Frees the native memory of the object.
String getAnnot(String in_id)
Gets PDF annotation(s) as JSON.
String getHtml()
Converts PDF to HTML.
String setAnnot(String in_json)
Updates PDF annotation.
void setDoNotReflowTextOverImages(boolean do_not_reflow_text_over_images)
Determines whether to not reflow text that appears over images.
void setHTMLOutputTextMarkup(boolean include)
Determines whether to write text markup tags into the output HTML.
void setHideBackgroundImages(boolean hide_background_images)
Determines whether to hide background images.
void setHideImagesUnderText(boolean hide_images_under_text)
Determines whether to hide images that are covered by text.
void setIncludeImages(boolean include)
Determines whether to include images in the output HTML.
void setMessageWhenNoReflowContent(String content)
Sets the error message in the output HTML when the page doesn't contain reflowable text.
void setMessageWhenReflowFailed(String content)
Sets the error message in the output HTML when reflow conversion fails.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Reflow (long impl_ptr)

Public Methods

public long __GetHandle ()

public void destroy ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

public String getAnnot (String in_id)

Gets PDF annotation(s) as JSON.

Parameters
in_id -- an annotation ID, or an empty string
Returns
  • returns JSON string

public String getHtml ()

Converts PDF to HTML.

Returns
  • returns HTML as a string

public String setAnnot (String in_json)

Updates PDF annotation.

Parameters
in_json -- update instructions (JSON)
Returns
  • returns JSON string

public void setDoNotReflowTextOverImages (boolean 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

public void setHTMLOutputTextMarkup (boolean 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.

public void setHideBackgroundImages (boolean 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

public void setHideImagesUnderText (boolean 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

public void setIncludeImages (boolean 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

public void setMessageWhenNoReflowContent (String 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

public void setMessageWhenReflowFailed (String 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