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 output document format (DOCX, RTF, TXT). It is the most useful when the output file extension is not .docx, .rtf or .txt.

    See

    WordOutputFormat

    Declaration

    Objective-C

    - (void)SetWordOutputFormat:(PTWordOutputFormat)format;

    Swift

    func setWordOutputFormat(_ format: PTWordOutputFormat)

    Parameters

    format

    the output document format (DOCX, RTF, TXT). @remark The DOC file format is now deprecated, DOCX is used automatically instead.

  • Specifies a range of pages to be converted. By default all pages are converted. The first page has the page number of 1.

    Declaration

    Objective-C

    - (void)SetPages:(int)page_from page_to:(int)page_to;

    Swift

    func setPages(_ page_from: Int32, page_to: Int32)

    Parameters

    page_from

    the first page to be converted.

    page_to

    the last page to be converted (inclusive). Use a negative value to specify the last page in the PDF.

  • 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 how scanned image pages should be converted. Default is e_ocr_text.

    See

    SearchableImageSetting

    Declaration

    Objective-C

    - (void)SetSearchableImageSetting:(PTWordSearchableImageSetting)setting;

    Swift

    func setSearchableImageSetting(_ setting: PTWordSearchableImageSetting)

    Parameters

    setting

    the searchable image setting. @remark Pre-existing OCRed content is ignored and a new OCR is performed from scratch.

  • Specifies whether hyphens in the PDF should be connected. 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 the OCR language. Default is automatic language detection.

    Declaration

    Objective-C

    - (void)SetLanguage:(PTLanguageChoice)language;

    Swift

    func setLanguage(_ language: PTLanguageChoice)

    Parameters

    language

    the OCR language.

  • Specifies preferred OCR engine.

    Declaration

    Objective-C

    - (void)SetPreferredOCREngine:(PTPreferredOCREngine)engine;

    Swift

    func setPreferredOCREngine(_ engine: PTPreferredOCREngine)

    Parameters

    engine

    The PreferredOCREngine to OCR.

  • Specifies the custom OCR languages to use.

    Note

    Use 3-letter ISO 639-2 language codes, separated by spaces. Example: “eng deu spa fra”. The default is English.

    Declaration

    Objective-C

    - (void)SetCustomOCRLanguage:(NSString *)ocrlang;

    Swift

    func setCustomOCRLanguage(_ ocrlang: String!)

    Parameters

    ocrlang

    the OCR language(s).

  • Specifies whether to prefer an exact visual replica of the PDF at the expense of preventing reflow of document paragraphs. Default is false.

    Declaration

    Objective-C

    - (void)SetPrioritizeVisualAppearance:(BOOL)replica;

    Swift

    func setPrioritizeVisualAppearance(_ replica: Bool)

    Parameters

    replica

    False is preferred for most documents that contain paragraphs. Consider using true for documents that don’t flow, such as CAD drawings, Illustrator-generated files.