Foxit PDF SDK

Public Member Functions | List of all members
com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData Class Reference

## Public Member Functions
| PDF2OfficeSettingData ()
| Constructor.
| PDF2OfficeSettingData (String metrics_data_folder_path, boolean enable_ml_recognition, Range page_range, boolean include_pdf_comments, PDF2WordSettingData word_setting_data, PDF2PowerPointSettingData power_point_setting_data, PDF2ExcelSettingData excel_setting_data, boolean enable_trailing_space, boolean include_images, int timeout, boolean enable_matching_system_fonts)
| Constructor, with parameters. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
boolean | getEnable_matching_system_fonts ()
| Get a boolean value that indicates whether to accurately match system fonts when converting PDF documents to office format documents. More...
boolean | getEnable_ml_recognition ()
| Get a boolean value which indicates whether enable machine learning-based recognition functionality. More...
boolean | getEnable_trailing_space ()
| Get a boolean value which indicates whether to add trailing spaces from lines in paragraphs for converting PDF documents to office format documents. More...
PDF2ExcelSettingData | getExcel_setting_data ()
| Get a setting data object that used for converting PDF documents to Excel format documents. More...
boolean | getInclude_images ()
| Get a boolean value which indicates whether to include images in PDF documents for converting PDF documents to office format documents. More...
boolean | getInclude_pdf_comments ()
| Get a boolean value which indicates whether to include PDF documents comments for the conversion of PDF documents to office format documents. More...
String | getMetrics_data_folder_path ()
| Get a valid path of a folder which contains metrics data files. More...
Range | getPage_range ()
| Get a range object that specifies some pages. More...
PDF2PowerPointSettingData | getPower_point_setting_data ()
| Get a setting data object that used for converting PDF documents to Power Point format documents. More...
int | getTimeout ()
| Get milliseconds for timeout used for PDF Conversion. More...
PDF2WordSettingData | getWord_setting_data ()
| Get a setting data object that used for converting PDF documents to Word format documents. More...
void | set (String metrics_data_folder_path, boolean enable_ml_recognition, Range page_range, boolean include_pdf_comments, PDF2WordSettingData word_setting_data, PDF2PowerPointSettingData power_point_setting_data, PDF2ExcelSettingData excel_setting_data, boolean enable_trailing_space, boolean include_images, int timeout, boolean enable_matching_system_fonts)
| Set value. More...
void | setEnable_matching_system_fonts (boolean value)
| Set a boolean value that indicates whether to accurately match system fonts when converting PDF documents to office format documents. More...
void | setEnable_ml_recognition (boolean value)
| Set a boolean value which indicates whether enable machine learning-based recognition functionality. More...
void | setEnable_trailing_space (boolean value)
| Set a boolean value which indicates whether to add trailing spaces from lines in paragraphs for converting PDF documents to office format documents. More...
void | setExcel_setting_data (PDF2ExcelSettingData value)
| Set a setting data object that used for converting PDF documents to Excel format documents. More...
void | setInclude_images (boolean value)
| Set a boolean value which indicates whether to include images in PDF documents for converting PDF documents to office format documents. More...
void | setInclude_pdf_comments (boolean value)
| Set a boolean value which indicates whether to include PDF documents comments for the conversion of PDF documents to office format documents. More...
void | setMetrics_data_folder_path (String value)
| Set a valid path of a folder which contains metrics data files. More...
void | setPage_range (Range value)
| Set a range object that specifies some pages. More...
void | setPower_point_setting_data (PDF2PowerPointSettingData value)
| Set a setting data object that used for converting PDF documents to Power Point format documents. More...
void | setTimeout (int value)
| Set milliseconds for timeout used for PDF Conversion. More...
void | setWord_setting_data (PDF2WordSettingData value)
| Set a setting data object that used for converting PDF documents to Word format documents. More...

## Detailed Description

This class represents setting data used for converting PDF to Office(Word, Excel or PowerPoint) format file.

## Constructor & Destructor Documentation

## ◆ PDF2OfficeSettingData()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.PDF2OfficeSettingData | ( | String | metrics_data_folder_path,
|  | boolean | enable_ml_recognition,
|  | Range | page_range,
|  | boolean | include_pdf_comments,
|  | PDF2WordSettingData | word_setting_data,
|  | PDF2PowerPointSettingData | power_point_setting_data,
|  | PDF2ExcelSettingData | excel_setting_data,
|  | boolean | enable_trailing_space,
|  | boolean | include_images,
|  | int | timeout,
|  | boolean | enable_matching_system_fonts
| ) |  |

Constructor, with parameters.

Parameters

  [in] | metrics_data_folder_path | (Deprecated)A valid path of a folder which contains metrics data files. This should not be an empty string. These metrics data files are used to simulate the office format document typesetting process during conversion. They are offered in the "res/metrics_data" folder of the Foxit PDF Conversion SDK package.
  [in] | enable_ml_recognition | A boolean value which indicates whether enable machine learning-based recognition functionality. Default value: false. true means enable machine learning-based recognition functionality to identify borderless tables in PDF documents. In order to convert the tables better, it will draw a black border with a width of 1 on the recognized borderless table. This will be improved in subsequent versions. And this recognition functionality will be executed on the server side and return the relevant results when it is done. false means disable machine learning-based recognition functionality. And the recognition functionality not based on machine learning will be enabled.
  [in] | page_range | A range object that specifies some pages. These pages will be used to convert PDF document to office format documents.
  [in] | include_pdf_comments | A boolean value which indicates whether to include PDF documents comments for the conversion of PDF documents to office format documents. Default value: true. true means to include PDF document comments for the conversion of PDF documents to office format documents. false means not to include PDF document comments for the conversion of PDF documents to office format documents.
  [in] | word_setting_data | A setting data object that used for converting PDF documents to Word format documents.
  [in] | power_point_setting_data | A setting data object that used for converting PDF documents to Power Point format documents.
  [in] | excel_setting_data | A setting data object that used for converting PDF documents to Excel format documents.
  [in] | enable_trailing_space | A boolean value which indicates whether to add trailing spaces from lines in paragraphs.for converting PDF documents to office format documents. Default value: true. true means to add trailing spaces from lines in paragraphs for converting PDF documents to office format documents. false means not to add trailing spaces from lines in paragraphs and add a property to the paragraph that allows for line breaks. Currently, this support is limited to paragraphs where more than 80% of the text involves the end of one line and the beginning of the next both being in Korean. This is only available for converting PDF documents to Word format documents, with support for other Office formats planned for the future.
  [in] | include_images | A boolean value which indicates whether to include images in PDF documents for converting PDF documents to office format documents. Default value: true/b>. true means to include images in PDF documents for converting PDF documents to office format documents. false means not to include images in PDF documents PDF documents to office format documents. This is only available for converting PDF documents to Word format documents, with support for other Office formats planned for the future.
  [in] | timeout | Milliseconds for timeout used for PDF Conversion. Default value: 0.
  [in] | enable_matching_system_fonts | A boolean value which indicates whether to enable matching system fonts for converting PDF documents to office format documents. Default value: false. This is only available for converting PDF documents to Word format documents, with support for other Office formats planned for the future.

Note
  Our machine learning-based technology for identifying borderless tables uses HTTPS and requires a network connection to send the images of the rendered PDF pages to our server during the conversion process.

## Member Function Documentation

## ◆ delete()

synchronized void com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

## ◆ getEnable_matching_system_fonts()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.getEnable_matching_system_fonts | ( |  | ) |

Get a boolean value that indicates whether to accurately match system fonts when converting PDF documents to office format documents.

true means accurately matching system fonts when converting PDF documents to office format documents. false means not accurately matching system fonts when converting PDF documents to office format documents. This is only available for converting PDF documents to Word format documents, with support for other Office formats planned for the future.

Returns
  A boolean value that indicates whether to accurately match system fonts when converting PDF documents to office format documents. Default value: false.

## ◆ getEnable_ml_recognition()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.getEnable_ml_recognition | ( |  | ) |

Get a boolean value which indicates whether enable machine learning-based recognition functionality.

true means enable machine learning-based recognition functionality to identify borderless tables in PDF documents. And this recognition functionality will be executed on the server side and return the relevant results when it is done. In order to convert the tables better, it will draw a black border with a width of 1 on the recognized borderless table. This will be improved in subsequent versions. false means disable machine learning-based recognition functionality. And the recognition functionality not based on machine learning will be enabled.

Note
  Our machine learning-based technology for identifying borderless tables uses HTTPS and requires a network connection to send the images of the rendered PDF pages to our server during the conversion process.

Returns
  A boolean value which indicates whether enable machine learning-based recognition functionality. Default value: false.

## ◆ getEnable_trailing_space()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.getEnable_trailing_space | ( |  | ) |

Get a boolean value which indicates whether to add trailing spaces from lines in paragraphs for converting PDF documents to office format documents.

true means to add trailing spaces from lines in paragraphs for converting PDF documents to office format documents. false means not to add trailing spaces from lines in paragraphs and add a property to the paragraph that allows for line breaks. Currently, this support is limited to paragraphs where more than 80% of the text involves the end of one line and the beginning of the next both being in Korean. This is only available for converting PDF documents to Word format documents, with support for other Office formats planned for the future.

Returns
  A boolean value which indicates whether to add trailing spaces from lines in paragraphs for converting PDF documents to office format documents. Default value: true.

## ◆ getExcel_setting_data()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.getExcel_setting_data | ( |  | ) |

Get a setting data object that used for converting PDF documents to Excel format documents.

This setting is only vaild for the conversion of PDF documents to Excel format documents. For more details, please refer to class PDF2ExcelSettingData .

Returns
  A setting data object that used for converting PDF documents to Excel format documents.

## ◆ getInclude_images()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.getInclude_images | ( |  | ) |

Get a boolean value which indicates whether to include images in PDF documents for converting PDF documents to office format documents.

true means to include images in PDF documents for converting PDF documents to office format documents. false means not to include images in PDF documents PDF documents to office format documents. This is only available for converting PDF documents to Word format documents, with support for other Office formats planned for the future.

Returns
  A boolean value which indicates whether to include images in PDF documents for converting PDF documents to office format documents. Default value: true/b>.

## ◆ getInclude_pdf_comments()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.getInclude_pdf_comments | ( |  | ) |

Get a boolean value which indicates whether to include PDF documents comments for the conversion of PDF documents to office format documents.

true means to include PDF document comments for the conversion of PDF documents to office format documents. false means not to include PDF document comments for the conversion of PDF documents to office format documents.

Returns
  A boolean value which indicates whether to include PDF documents comments for the conversion of PDF documents to office format documents. Default value: true.

## ◆ getMetrics_data_folder_path()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.getMetrics_data_folder_path | ( |  | ) |

Get a valid path of a folder which contains metrics data files.

Deprecated:
  Current property has been deprecated since Foxit PDF SDK 10.1. Instead, metrics data will be included in the dynamic library.

These metrics data files are used to simulate the office format document typesetting process during conversion. They are offered in the "res/metrics_data" folder of the Foxit PDF Conversion SDK package.

Returns
  A valid path of a folder which contains metrics data files. This should not be an empty string.

## ◆ getPage_range()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.getPage_range | ( |  | ) |

Get a range object that specifies some pages.

The valid page range: from 0 to (count - 1). count is returned by function PDFDoc.getPageCount . If this range object is constructed by default constructor and not set any value, that means all the pages of current document will be used to convert PDF documents to office format documents.

Returns
  A range object that specifies some pages. These pages will be used to convert PDF documents to office format documents.

## ◆ getPower_point_setting_data()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.getPower_point_setting_data | ( |  | ) |

Get a setting data object that used for converting PDF documents to Power Point format documents.

This setting is only vaild for the conversion of PDF documents to Power Point format documents. For more details, please refer to class PDF2PowerPointSettingData .

Returns
  A setting data object that used for converting PDF documents to Power Point format documents.

## ◆ getTimeout()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.getTimeout | ( |  | ) |

Get milliseconds for timeout used for PDF Conversion.

If the conversion process is not completed within the specified time, the conversion process will be terminated. This should be a non-negative value. If the value is 0, that means no timeout processing for PDF Conversion.
This parameter only useful when Foxit PDF Conversion engine is set by function PDF2Office.initialize . Default value: 0.

Note
  Resource release may take some time, so the time spent on the entire conversion process may exceed the time set by this parameter.

Returns
  Milliseconds for timeout used for PDF Conversion.

## ◆ getWord_setting_data()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.getWord_setting_data | ( |  | ) |

Get a setting data object that used for converting PDF documents to Word format documents.

This setting is only vaild for the conversion of PDF documents to word format documents. For more details, please refer to class PDF2WordSettingData .

Returns
  A setting data object that used for converting PDF documents to Word format documents.

## ◆ set()

void com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.set | ( | String | metrics_data_folder_path,
|  | boolean | enable_ml_recognition,
|  | Range | page_range,
|  | boolean | include_pdf_comments,
|  | PDF2WordSettingData | word_setting_data,
|  | PDF2PowerPointSettingData | power_point_setting_data,
|  | PDF2ExcelSettingData | excel_setting_data,
|  | boolean | enable_trailing_space,
|  | boolean | include_images,
|  | int | timeout,
|  | boolean | enable_matching_system_fonts
| ) |  |

Set value.

Parameters

  [in] | metrics_data_folder_path | (Deprecated)A valid path of a folder which contains metrics data files. This should not be an empty string. These metrics data files are used to simulate the office format document typesetting process during conversion. They are offered in the "res/metrics_data" folder of the Foxit PDF Conversion SDK package.
  [in] | enable_ml_recognition | A boolean value which indicates whether enable machine learning-based recognition functionality. Default value: false. true means enable machine learning-based recognition functionality to identify borderless tables in PDF documents. In order to convert the tables better, it will draw a black border with a width of 1 on the recognized borderless table. This will be improved in subsequent versions. And this recognition functionality will be executed on the server side and return the relevant results when it is done. false means disable machine learning- based recognition functionality. And the recognition functionality not based on machine learning will be enabled.
  [in] | page_range | A range object that specifies some pages. These pages will be used to convert PDF documents to office format documents.
  [in] | include_pdf_comments | A boolean value which indicates whether to include PDF documents comments for the conversion of PDF documents to office format documents. Default value: true. true means to include PDF document comments for the conversion of PDF documents to office format documents. false means not to include PDF document comments for the conversion of PDF documents to office format documents.
  [in] | word_setting_data | A setting data object that used for converting PDF documents to Word format documents.
  [in] | power_point_setting_data | A setting data object that used for converting PDF documents to Power Point format documents.
  [in] | excel_setting_data | A setting data object that used for converting PDF documents to Excel format documents.
  [in] | enable_trailing_space | A boolean value which indicates whether to add trailing spaces from lines in paragraphs.for converting PDF documents to office format documents. Default value: true. true means to add trailing spaces from lines in paragraphs for converting PDF documents to office format documents. false means not to add trailing spaces from lines in paragraphs and add a property to the paragraph that allows for line breaks. Currently, this support is limited to paragraphs where more than 80% of the text involves the end of one line and the beginning of the next both being in Korean. This is only available for converting PDF documents to Word format documents, with support for other Office formats planned for the future.
  [in] | include_images | A boolean value which indicates whether to include images in PDF documents for converting PDF documents to office format documents. Default value: true/b>. true means to include images in PDF documents for converting PDF documents to office format documents. false means not to include images in PDF documents PDF documents to office format documents. This is only available for converting PDF documents to Word format documents, with support for other Office formats planned for the future.
  [in] | timeout | Milliseconds for timeout used for PDF Conversion. Default value: 0.
  [in] | enable_matching_system_fonts | A boolean value which indicates whether to enable matching system fonts for converting PDF documents to office format documents. Default value: false. This is only available for converting PDF documents to Word format documents, with support for other Office formats planned for the future.

Note
  Our machine learning-based technology for identifying borderless tables uses HTTPS and requires a network connection to send the images of the rendered PDF pages to our server during the conversion process.

Returns
  None.

## ◆ setEnable_matching_system_fonts()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.setEnable_matching_system_fonts | ( | boolean | value | ) |

Set a boolean value that indicates whether to accurately match system fonts when converting PDF documents to office format documents.

true means accurately matching system fonts when converting PDF documents to office format documents. false means not accurately matching system fonts when converting PDF documents to office format documents. This is only available for converting PDF documents to Word format documents, with support for other Office formats planned for the future.

Parameters

  [in] | value | A boolean value that indicates whether to accurately match system fonts when converting PDF documents to office format documents. Default value: false.

Returns
  None.

## ◆ setEnable_ml_recognition()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.setEnable_ml_recognition | ( | boolean | value | ) |

Set a boolean value which indicates whether enable machine learning-based recognition functionality.

true means enable machine learning-based recognition functionality to identify borderless tables in PDF documents. And this recognition functionality will be executed on the server side and return the relevant results when it is done. In order to convert the tables better, it will draw a black border with a width of 1 on the recognized borderless table. This will be improved in subsequent versions. false means disable machine learning-based recognition functionality. And the recognition functionality not based on machine learning will be enabled.

Note
  Our machine learning-based technology for identifying borderless tables uses HTTPS and requires a network connection to send the images of the rendered PDF pages to our server during the conversion process.

Parameters

  [in] | value | A boolean value which indicates whether enable machine learning-based recognition functionality. Default value: false.

Returns
  None.

## ◆ setEnable_trailing_space()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.setEnable_trailing_space | ( | boolean | value | ) |

Set a boolean value which indicates whether to add trailing spaces from lines in paragraphs for converting PDF documents to office format documents.

true means to add trailing spaces from lines in paragraphs for converting PDF documents to office format documents. false means not to add trailing spaces from lines in paragraphs and add a property to the paragraph that allows for line breaks. Currently, this support is limited to paragraphs where more than 80% of the text involves the end of one line and the beginning of the next both being in Korean. This is only available for converting PDF documents to Word format documents, with support for other Office formats planned for the future.

Parameters

  [in] | value | A boolean value which indicates whether to add trailing spaces from lines in paragraphs for converting PDF documents to office format documents. Default value: true.

Returns
  None.

## ◆ setExcel_setting_data()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.setExcel_setting_data | ( | PDF2ExcelSettingData | value | ) |

Set a setting data object that used for converting PDF documents to Excel format documents.

This setting is only vaild for the conversion of PDF documents to Excel format documents. For more details, please refer to class PDF2ExcelSettingData .

Parameters

  [in] | value | A setting data object that used for converting PDF documents to Excel format documents.

Returns
  None.

## ◆ setInclude_images()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.setInclude_images | ( | boolean | value | ) |

Set a boolean value which indicates whether to include images in PDF documents for converting PDF documents to office format documents.

true means to include images in PDF documents for converting PDF documents to office format documents. false means not to include images in PDF documents PDF documents to office format documents. This is only available for converting PDF documents to Word format documents, with support for other Office formats planned for the future.

Parameters

  [in] | value | A boolean value which indicates whether to include images in PDF documents for converting PDF documents to office format documents. Default value: true/b>.

Returns
  None.

## ◆ setInclude_pdf_comments()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.setInclude_pdf_comments | ( | boolean | value | ) |

Set a boolean value which indicates whether to include PDF documents comments for the conversion of PDF documents to office format documents.

true means to include PDF document comments for the conversion of PDF documents to office format documents. false means not to include PDF document comments for the conversion of PDF documents to office format documents.

Parameters

  [in] | value | A boolean value which indicates whether to include PDF documents comments for the conversion of PDF documents to office format documents. Default value: true.

Returns
  None.

## ◆ setMetrics_data_folder_path()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.setMetrics_data_folder_path | ( | String | value | ) |

Set a valid path of a folder which contains metrics data files.

Deprecated:
  Current property has been deprecated since Foxit PDF SDK 10.1. Instead, metrics data will be included in the dynamic library.

These metrics data files are used to simulate the office format document typesetting process during conversion. They are offered in the "res/metrics_data" folder of the Foxit PDF Conversion SDK package.

Parameters

  [in] | value | A valid path of a folder which contains metrics data files. This should not be an empty string.

Returns
  None.

## ◆ setPage_range()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.setPage_range | ( | Range | value | ) |

Set a range object that specifies some pages.

The valid page range: from 0 to (count - 1). count is returned by function PDFDoc.getPageCount . If this range object is constructed by default constructor and not set any value, that means all the pages of current document will be used to convert PDF documents to office format documents.

Parameters

  [in] | value | A range object that specifies some pages. These pages will be used to convert PDF documents to office format documents.

Returns
  None.

## ◆ setPower_point_setting_data()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.setPower_point_setting_data | ( | PDF2PowerPointSettingData | value | ) |

Set a setting data object that used for converting PDF documents to Power Point format documents.

This setting is only vaild for the conversion of PDF documents to Power Point format documents. For more details, please refer to class PDF2PowerPointSettingData .

Parameters

  [in] | value | A setting data object that used for converting PDF documents to Power Point format documents.

Returns
  None.

## ◆ setTimeout()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.setTimeout | ( | int | value | ) |

Set milliseconds for timeout used for PDF Conversion.

If the conversion process is not completed within the specified time, the conversion process will be terminated. This should be a non-negative value. If the value is 0, that means no timeout processing for PDF Conversion.
This parameter only useful when Foxit PDF Conversion engine is set by function PDF2Office.initialize . Default value: 0.

Note
  Resource release may take some time, so the time spent on the entire conversion process may exceed the time set by this parameter.

Parameters

  [in] | value | Milliseconds for timeout used for PDF Conversion.

Returns
  None.

## ◆ setWord_setting_data()

com.foxit.sdk.addon.conversion.pdf2office.PDF2OfficeSettingData.setWord_setting_data | ( | PDF2WordSettingData | value | ) |

Set a setting data object that used for converting PDF documents to Word format documents.

This setting is only vaild for the conversion of PDF documents to word format documents. For more details, please refer to class PDF2WordSettingData .

Parameters

  [in] | value | A setting data object that used for converting PDF documents to Word format documents.

Returns
  None.