PTWordOutputOptions

@interface PTWordOutputOptions : NSObject

A class containing options common to ToWord functions

  • Creates a WordOutputOptions object with default settings.

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()
  • Specifies the compression quality to use when generating JPEG images.

    Declaration

    Objective-C

    - (void)SetJPGQuality:(unsigned int)quality;

    Swift

    func setJPGQuality(_ quality: UInt32)

    Parameters

    quality

    the JPEG compression quality, from 0 (highest compression) to 100 (best quality). Default is 75.

  • Specifies the output image resolution, from 8 to 600, in Pixels Per Inch (PPI). The higher the PPI, the larger the image. Default 192.

    Declaration

    Objective-C

    - (void)SetImageDPI:(unsigned int)dpi;

    Swift

    func setImageDPI(_ dpi: UInt32)

    Parameters

    dpi

    the resolution in Pixels Per Inch.

  • Specifies the output document format (DOCX, DOC, RTF). It is the most useful when the output file extension is not .docx, .doc or .rtf.

    See

    WordOutputFormat

    Declaration

    Objective-C

    - (void)SetWordOutputFormat:(PTWordOutputFormat)format;

    Swift

    func setWordOutputFormat(_ format: PTWordOutputFormat)

    Parameters

    format

    the output document format (DOCX, DOC, RTF).

  • Specifies the amount of time in seconds after which the conversion fails. Default is 300. Very long files need more time to convert.

    Declaration

    Objective-C

    - (void)SetFileConversionTimeoutSeconds:(int)seconds;

    Swift

    func setFileConversionTimeoutSeconds(_ seconds: Int32)

    Parameters

    seconds

    the timeout in seconds.

  • Specifies a range of pages to be converted. By default all pages are converted. The first page has the page number of 1. Use a negative value to specify the last page in the PDF.

    Declaration

    Objective-C

    - (void)SetPages:(int)pageFrom pageTo:(int)pageTo;

    Swift

    func setPages(_ pageFrom: Int32, pageTo: Int32)

    Parameters

    pageFrom

    the first page to be converted.

    pageTo

    the last page to be converted (inclusive).

  • Specifies the password if the PDF requires one.

    Declaration

    Objective-C

    - (void)SetPDFPassword:(NSString *)password;

    Swift

    func setPDFPassword(_ password: String!)

    Parameters

    password

    the PDF password, if required; an empty string otherwise.

  • Specifies if and how PDF bookmarks should be converted into Word. Default is e_bm_none.

    See

    BookmarkConversionMethod

    Declaration

    Objective-C

    - (void)SetBookmarkConversionMethod:(PTBookmarkConversionMethod)method;

    Swift

    func setBookmarkConversionMethod(_ method: PTBookmarkConversionMethod)

    Parameters

    method

    the bookmark conversion method.

  • Specifies how image + hidden text pages should be converted. Default is e_ocr_image_text.

    Note

    This feature does not perform OCR.

    See

    SearchableImageSetting

    Declaration

    Objective-C

    - (void)SetSearchableImageSetting:(PTWordSearchableImageSetting)setting;

    Swift

    func setSearchableImageSetting(_ setting: PTWordSearchableImageSetting)

    Parameters

    setting

    the searchable image setting.

  • Specifies whether to shrink character spaces in order to prevent word wraps. Default is false.

    Declaration

    Objective-C

    - (void)SetShrinkCharacterSpacingToPreventWrap:(BOOL)shrink;

    Swift

    func setShrinkCharacterSpacing(toPreventWrap shrink: Bool)

    Parameters

    shrink

    if true, character spaces are shrunk in order to prevent word wraps.

  • Specifies whether PDF line breaks should come out as line breaks in the Word output. This causes each line of text to become a separate paragraph. Default is false.

    Declaration

    Objective-C

    - (void)SetMatchPDFLineBreaks:(BOOL)match;

    Swift

    func setMatchPDFLineBreaks(_ match: Bool)

    Parameters

    match

    if true, line breaks will come out as line breaks in the Word output.

  • Specifies whether hyphens in the PDF should be connected. This only works with English words. Default is false.

    Declaration

    Objective-C

    - (void)SetConnectHyphens:(BOOL)connect;

    Swift

    func setConnectHyphens(_ connect: Bool)

    Parameters

    connect

    if true, hyphens in the PDF will be connected.

  • Specifies whether to disable font adjustments during conversion. Default is false.

    Declaration

    Objective-C

    - (void)SetDoNotAdjustFonts:(BOOL)do_not_adjust;

    Swift

    func setDoNotAdjustFonts(_ do_not_adjust: Bool)

    Parameters

    do_not_adjust

    if true, font adjustments are disabled during conversion.

  • Specifies whether to disable the detection of section columns. Default is false. Enable this if your tables are coming out as section columns.

    Declaration

    Objective-C

    - (void)SetDisableVerticalSplit:(BOOL)disable;

    Swift

    func setDisableVerticalSplit(_ disable: Bool)

    Parameters

    disable

    if true, the detection of section columns are disabled.