new Reflow()
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.
Extends
Methods
-
destroy()
-
Destructor
- Inherited From:
Returns:
- Type
- Promise.<void>
-
getAnnot(in_id)
-
Gets PDF annotation(s) as JSON.
Parameters:
Name Type Description in_id
string - an annotation ID, or an empty string. Returns:
A promise that resolves to returns JSON string.- Type
- Promise.<string>
-
getHtml()
-
Converts PDF to HTML.
Returns:
A promise that resolves to returns HTML as a string.- Type
- Promise.<string>
-
setAnnot(in_json)
-
Updates PDF annotation.
Parameters:
Name Type Description in_json
string - update instructions (JSON). Returns:
A promise that resolves to returns JSON string.- Type
- Promise.<string>
-
setDoNotReflowTextOverImages(do_not_reflow_text_over_images)
-
Determines whether to not reflow text that appears over images. Default is false.
Parameters:
Name Type Description do_not_reflow_text_over_images
boolean - if true, text that appears over images will not be included in the output HTML. Returns:
- Type
- Promise.<void>
-
setHideBackgroundImages(hide_background_images)
-
Determines whether to hide background images. Default is false.
Parameters:
Name Type Description hide_background_images
boolean - if true, background images will not be included in the output HTML. Returns:
- Type
- Promise.<void>
-
setHideImagesUnderText(hide_images_under_text)
-
Determines whether to hide images that are covered by text. Default is false.
Parameters:
Name Type Description hide_images_under_text
boolean - if true, images that are covered by text will not be included in the output HTML. Returns:
- Type
- Promise.<void>
-
setHTMLOutputTextMarkup(include)
-
Determines whether to write text markup tags into the output HTML. Default is false.
Parameters:
Name Type Description include
boolean - if true text markup tags will be included in the output HTML.. Returns:
- Type
- Promise.<void>
-
setIncludeImages(include)
-
Determines whether to include images in the output HTML. Default is false.
Parameters:
Name Type Description include
boolean - if true images will be included in the output HTML. Returns:
- Type
- Promise.<void>
-
setMessageWhenNoReflowContent(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:
Name Type Description content
string - the localized message. Returns:
- Type
- Promise.<void>
-
setMessageWhenReflowFailed(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:
Name Type Description content
string - the localized message. Returns:
- Type
- Promise.<void>
-
takeOwnership()
-
Take the ownership of this object, so that PDFNet.runWithCleanup won't destroy this object.
- Inherited From:
Returns:
- Type
- void