public static class

Convert.WordOutputOptions

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.Convert.WordOutputOptions

Class Overview

A class containing options common to toWord functions

Summary

Constants
int e_bm_extract The Constant e_bm_extract.
int e_bm_none The Constant e_bm_none.
int e_bm_page The Constant e_bm_page.
int e_ocr_image The Constant e_ocr_image.
int e_ocr_image_text The Constant e_ocr_image_text.
int e_ocr_text The Constant e_ocr_text.
int e_wof_doc The Constant e_wof_doc.
int e_wof_docx The Constant e_wof_docx.
int e_wof_rtf The Constant e_wof_rtf.
Public Constructors
WordOutputOptions()
Creates a WordOutputOptions object with default settings
Public Methods
void setBookmarkConversionMethod(int method)
Specifies if and how PDF bookmarks should be converted into Word.
void setConnectHyphens(boolean connect)
Specifies whether hyphens in the PDF should be connected.
void setDisableVerticalSplit(boolean disable)
Specifies whether to disable the detection of section columns.
void setDoNotAdjustFonts(boolean do_not_adjust)
Specifies whether to disable font adjustments during conversion.
void setFileConversionTimeoutSeconds(int seconds)
Specifies the amount of time in seconds after which the conversion fails.
void setImageDPI(int dpi)
Specifies the output image resolution, from 8 to 600, in Pixels Per Inch (PPI).
void setJPGQuality(int quality)
Specifies the compression quality to use when generating JPEG images.
void setMatchPDFLineBreaks(boolean match)
Specifies whether PDF line breaks should come out as line breaks in the Word output.
void setPDFPassword(String password)
Specifies the password if the PDF requires one.
void setPages(int pageFrom, int pageTo)
Specifies a range of pages to be converted.
void setSearchableImageSetting(int setting)
Specifies how image + hidden text pages should be converted.
void setShrinkCharacterSpacingToPreventWrap(boolean shrink)
Specifies whether to shrink character spaces in order to prevent word wraps.
void setWordOutputFormat(int format)
Specifies the output document format (DOCX, DOC, RTF).
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int e_bm_extract

The Constant e_bm_extract. Indicates that bookmarks are converted from PDF to Word.

Constant Value: 2 (0x00000002)

public static final int e_bm_none

The Constant e_bm_none. Indicates that no bookmarks are created.

Constant Value: 0 (0x00000000)

public static final int e_bm_page

The Constant e_bm_page. Indicates that a bookmark is created for each page (default).

Constant Value: 1 (0x00000001)

public static final int e_ocr_image

The Constant e_ocr_image. Indicates that only the images are going to be visible.

Constant Value: 1 (0x00000001)

public static final int e_ocr_image_text

The Constant e_ocr_image_text. Indicates that both text and image are going to be visible (default).

Constant Value: 0 (0x00000000)

public static final int e_ocr_text

The Constant e_ocr_text. Indicates that only the text is going to be visible.

Constant Value: 2 (0x00000002)

public static final int e_wof_doc

The Constant e_wof_doc. Indicates a DOC output.

Constant Value: 1 (0x00000001)

public static final int e_wof_docx

The Constant e_wof_docx. Indicates a DOCX output (default).

Constant Value: 0 (0x00000000)

public static final int e_wof_rtf

The Constant e_wof_rtf. Indicates an RTF output.

Constant Value: 2 (0x00000002)

Public Constructors

public WordOutputOptions ()

Creates a WordOutputOptions object with default settings

Public Methods

public void setBookmarkConversionMethod (int method)

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

Parameters
method the bookmark conversion method.

public void setConnectHyphens (boolean connect)

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

Parameters
connect if true, hyphens in the PDF will be connected.

public void setDisableVerticalSplit (boolean 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
disable if true, the detection of section columns are disabled.

public void setDoNotAdjustFonts (boolean do_not_adjust)

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

Parameters
do_not_adjust if true, font adjustments are disabled during conversion.

public void setFileConversionTimeoutSeconds (int 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
seconds the timeout in seconds.

public void setImageDPI (int 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
dpi the resolution in Pixels Per Inch.

public void setJPGQuality (int quality)

Specifies the compression quality to use when generating JPEG images.

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

public void setMatchPDFLineBreaks (boolean 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
match if true, line breaks will come out as line breaks in the Word output.

public void setPDFPassword (String password)

Specifies the password if the PDF requires one.

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

public void setPages (int pageFrom, int 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
pageFrom the first page to be converted.
pageTo the last page to be converted (inclusive).

public void setSearchableImageSetting (int setting)

Specifies how image + hidden text pages should be converted. Default is e_ocr_image_text. Note: This feature does not perform OCR.

Parameters
setting the searchable image setting.

public void setShrinkCharacterSpacingToPreventWrap (boolean shrink)

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

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

public void setWordOutputFormat (int 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
format the output document format (DOCX, DOC, RTF).