PTReflow

@interface PTReflow : NSObject

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.

  • Converts PDF to HTML.

    Declaration

    Objective-C

    - (NSString *)GetHtml;

    Swift

    func getHtml() -> String!

    Return Value

    returns HTML as a string.

  • Gets PDF annotation(s) as JSON.

    Declaration

    Objective-C

    - (NSString *)GetAnnot:(NSString *)in_id;

    Swift

    func getAnnot(_ in_id: String!) -> String!

    Parameters

    in_id

    – an annotation ID, or an empty string.

    Return Value

    returns JSON string.

  • Updates PDF annotation.

    Declaration

    Objective-C

    - (NSString *)SetAnnot:(NSString *)in_json;

    Swift

    func setAnnot(_ in_json: String!) -> String!

    Parameters

    in_json

    – update instructions (JSON).

    Return Value

    returns JSON string.

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

    Declaration

    Objective-C

    - (void)SetIncludeImages:(BOOL)include;

    Swift

    func setIncludeImages(_ include: Bool)

    Parameters

    include

    – if true images will be included in the output HTML.

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

    Declaration

    Objective-C

    - (void)SetHTMLOutputTextMarkup:(BOOL)include;

    Swift

    func setHTMLOutputTextMarkup(_ include: Bool)

    Parameters

    include

    – if true text markup tags will be included in the output HTML..

  • 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

    Objective-C

    - (void)SetMessageWhenNoReflowContent:(NSString *)content;

    Swift

    func setMessageWhenNoReflowContent(_ content: String!)

    Parameters

    content

    – the localized message.

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

    Declaration

    Objective-C

    - (void)SetMessageWhenReflowFailed:(NSString *)content;

    Swift

    func setMessageWhenReflowFailed(_ content: String!)

    Parameters

    content

    – the localized message.

  • Determines whether to hide background images. Default is false.

    Declaration

    Objective-C

    - (void)SetHideBackgroundImages:(BOOL)hide_background_images;

    Swift

    func setHideBackgroundImages(_ hide_background_images: Bool)

    Parameters

    hide_background_images

    – if true, background images will not be included in the output HTML.

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

    Declaration

    Objective-C

    - (void)SetHideImagesUnderText:(BOOL)hide_images_under_text;

    Swift

    func setHideImagesUnderText(_ hide_images_under_text: Bool)

    Parameters

    hide_images_under_text

    – if true, images that are covered by text will not be included in the output HTML.

  • 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

    Objective-C

    - (void)SetHideImagesUnderInvisibleText:(BOOL)hide_images_under_invisible_text;

    Swift

    func setHideImagesUnderInvisibleText(_ hide_images_under_invisible_text: Bool)

    Parameters

    hide_images_under_invisible_text

    – if true, images that are covered by invisible text will not be included in the output HTML.

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

    Declaration

    Objective-C

    - (void)SetDoNotReflowTextOverImages:(BOOL)do_not_reflow_text_over_images;

    Swift

    func setDoNotReflowTextOverImages(_ do_not_reflow_text_over_images: Bool)

    Parameters

    do_not_reflow_text_over_images

    – if true, text that appears over images will not be included in the output HTML.

  • 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

    Objective-C

    - (void)SetFontOverrideName:(NSString *)font_family;

    Swift

    func setFontOverrideName(_ font_family: String!)

    Parameters

    font_family

    – the font-family value that goes to the CSS in the output HTML.

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

    Declaration

    Objective-C

    - (void)SetCustomStyles:(NSString *)styles;

    Swift

    func setCustomStyles(_ styles: String!)

    Parameters

    styles

    – the CSS code without any