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. @remark Deprecated. The optimal JPEG quality is now chosen automatically for best balance between size and quality.
-
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. @remark Deprecated. The optimal image resolution is now chosen automatically for best balance between size and quality.
-
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
WordOutputFormatDeclaration
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 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. @remark Deprecated. The timeout feature is no longer necessary.
-
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 if and how PDF bookmarks should be converted into Word. Default is e_bm_extract.
See
BookmarkConversionMethodDeclaration
Objective-C
- (void)SetBookmarkConversionMethod:(PTBookmarkConversionMethod)method;
Swift
func setBookmarkConversionMethod(_ method: PTBookmarkConversionMethod)
Parameters
method
the bookmark conversion method. @remark Deprecated. PDF bookmarks are now automatically converted to Word bookmarks.
-
Specifies how scanned image pages should be converted. Default is e_ocr_text.
See
SearchableImageSettingDeclaration
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 to shrink character spaces in order to prevent word wraps. Default is true.
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. @remark Deprecated. Character spacing is now detected automatically.
-
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. @remark Deprecated. Line breaks are now detected automatically.
-
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 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. @remark Deprecated. Font sizes are now detected automatically.
-
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. @remark Deprecated. Columns are now detected automatically.
-
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 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.