Class: WordOutputOptions

PDFNet.Convert. WordOutputOptions


new WordOutputOptions()

A class containing options common to ToWord functions

Members


<static> BookmarkConversionMethod

Type:
  • number
Properties:
Name Type Description
e_bm_none number Indicates that no bookmarks are created.
e_bm_page number Indicates that a bookmark is created for each page (default).
e_bm_extract number Indicates that bookmarks are converted from PDF to Word.

<static> SearchableImageSetting

Type:
  • number
Properties:
Name Type Description
e_ocr_image_text number Indicates that both text and image are going to be visible (default).
e_ocr_image number Indicates that only the images are going to be visible.
e_ocr_text number Indicates that only the text is going to be visible.

<static> WordOutputFormat

Type:
  • number
Properties:
Name Type Description
e_wof_docx number
e_wof_doc number
e_wof_rtf number

Methods


setBookmarkConversionMethod(method)

Specifies if and how PDF bookmarks should be converted into Word. Default is e_bm_none.
Parameters:
Name Type Description
method number
PDFNet.Convert.WordOutputOptions.BookmarkConversionMethod = {
	e_bm_none: 0,
	e_bm_page: 1,
	e_bm_extract: 2
}
the bookmark conversion method.
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions

setConnectHyphens(connect)

Specifies whether hyphens in the PDF should be connected. This only works with English words. Default is false.
Parameters:
Name Type Description
connect boolean if true, hyphens in the PDF will be connected.
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions

setDisableVerticalSplit(disable)

Specifies whether to disable the detection of section columns. Default is false. Enable this if your tables are coming out as section columns.
Parameters:
Name Type Description
disable boolean if true, the detection of section columns are disabled.
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions

setDoNotAdjustFonts(do_not_adjust)

Specifies whether to disable font adjustments during conversion. Default is false.
Parameters:
Name Type Description
do_not_adjust boolean if true, font adjustments are disabled during conversion.
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions

setFileConversionTimeoutSeconds(seconds)

Specifies the amount of time in seconds after which the conversion fails. Default is 300. Very long files need more time to convert.
Parameters:
Name Type Description
seconds number the timeout in seconds.
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions

setImageDPI(dpi)

Specifies the output image resolution, from 8 to 600, in Pixels Per Inch (PPI). The higher the PPI, the larger the image. Default 192.
Parameters:
Name Type Description
dpi number the resolution in Pixels Per Inch.
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions

setJPGQuality(quality)

Specifies the compression quality to use when generating JPEG images.
Parameters:
Name Type Description
quality number the JPEG compression quality, from 0 (highest compression) to 100 (best quality). Default is 75.
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions

setMatchPDFLineBreaks(match)

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.
Parameters:
Name Type Description
match boolean if true, line breaks will come out as line breaks in the Word output.
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions

setPages(pageFrom, pageTo)

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.
Parameters:
Name Type Description
pageFrom number the first page to be converted.
pageTo number the last page to be converted (inclusive).
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions

setPDFPassword(password)

Specifies the password if the PDF requires one.
Parameters:
Name Type Description
password string the PDF password, if required; an empty string otherwise.
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions

setSearchableImageSetting(setting)

Specifies how image + hidden text pages should be converted. Default is e_ocr_image_text. Note: This feature does not perform OCR.
Parameters:
Name Type Description
setting number
PDFNet.Convert.WordOutputOptions.SearchableImageSetting = {
	e_ocr_image_text: 0,
	e_ocr_image: 1,
	e_ocr_text: 2
}
the searchable image setting.
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions

setShrinkCharacterSpacingToPreventWrap(shrink)

Specifies whether to shrink character spaces in order to prevent word wraps. Default is false.
Parameters:
Name Type Description
shrink boolean if true, character spaces are shrunk in order to prevent word wraps.
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions

setWordOutputFormat(format)

Specifies the output document format (DOCX, DOC, RTF). It is the most useful when the output file extension is not .docx, .doc or .rtf.
Parameters:
Name Type Description
format number
PDFNet.Convert.WordOutputOptions.WordOutputFormat = {
	e_wof_docx: 0,
	e_wof_doc: 1,
	e_wof_rtf: 2
}
the output document format (DOCX, DOC, RTF).
Returns:
this object, for call chaining
Type
PDFNet.Convert.WordOutputOptions