Foxit PDF SDK

Public Types | Static Public Member Functions | List of all members
foxit::pdf::Combination Class Reference
Inheritance diagram for foxit::pdf::Combination:

## Public Types
enum | CombineDocsOptions { e_CombineDocsOptionBookmark = 0x0001, e_CombineDocsOptionAcroformRename = 0x0002, e_CombineDocsOptionStructrueTree = 0x0004, e_CombineDocsOptionOutputIntents = 0x0008, e_CombineDocsOptionOCProperties = 0x0010, e_CombineDocsOptionMarkInfos = 0x0020, e_CombineDocsOptionPageLabels = 0x0040, e_CombineDocsOptionNames = 0x0080, e_CombineDocsOptionObjectStream = 0x0100, e_CombineDocsOptionDuplicateStream = 0x0200 }
| Enumeration for options used for combining PDF files. More...

## Static Public Member Functions
static common::Progressive | StartCombineDocuments (const char *dest_file_path, const CombineDocumentInfoArray &document_array, uint32 options, common::PauseCallback *pause=0)
| Start to combine PDF files. More...
static common::Progressive | StartCombineDocuments (const wchar_t *dest_file_path, const CombineDocumentInfoArray &document_array, uint32 options, common::PauseCallback *pause=0)
| Start to combine PDF files. More...
static common::Progressive | StartCombineDocuments (foxit::common::file::WriterCallback *dest_file, const CombineDocumentInfoArray &document_array, uint32 options, foxit::common::PauseCallback *pause=0)
| Start to combine PDF files. More...

## Additional Inherited Members
Public Member Functions inherited from foxit::Base
FS_HANDLE | Handle () const
| Get the handle of current object. More...

## Detailed Description

This class can be used to combine several PDF files into one PDF file.

## Member Enumeration Documentation

## ◆ CombineDocsOptions

enum foxit::pdf::Combination::CombineDocsOptions

Enumeration for options used for combining PDF files.

Values of this enumeration can be used alone or in combination.

Enumerator
e_CombineDocsOptionBookmark | If set, that means bookmarks of source PDF files will be outputted to combined result PDF file.
e_CombineDocsOptionAcroformRename | If set, that means fields with same name will be renamed in combined result PDF file.
e_CombineDocsOptionStructrueTree | If set, that means structure trees of source PDF files will be outputted to combined result PDF file.
e_CombineDocsOptionOutputIntents | If set, that means output intents of source PDF files will be outputted to combined result PDF file.
e_CombineDocsOptionOCProperties | If set, that means "OCProperties" of source PDF files will be outputted to combined result PDF file.
e_CombineDocsOptionMarkInfos | If set, that means "MarkInfo" of source PDF files will be outputted to combined result PDF file.
e_CombineDocsOptionPageLabels | If set, that means page labels of source PDF files will be outputted to combined result PDF file.
e_CombineDocsOptionNames | If set, that means "Dests" name trees and "EmbeddedFiles" name trees of source PDF files will be outputted to combined result PDF file.
e_CombineDocsOptionObjectStream | If set, that means object streams will be used to generate combined result PDF file in order to reduce result file size.
e_CombineDocsOptionDuplicateStream | If set, that means duplicate stream objects from source PDF files will be outputted to combined result PDF file.

## Member Function Documentation

## ◆ StartCombineDocuments() [1/3]

static common::Progressive foxit::pdf::Combination::StartCombineDocuments | ( | const char * | dest_file_path,
|  | const CombineDocumentInfoArray & | document_array,
|  | uint32 | options,
|  | common::PauseCallback * | pause = `0`
| ) |  |
| static

Start to combine PDF files.

It may take a long time to combining documents, so Foxit PDF SDK uses a progressive process to do this. This function does not support to combine XFA document.

Parameters

  [in] | dest_file_path | A full path to save the combined result PDF file. This should not be an empty string.
  [in] | document_array | An information array which represents information of source PDF files which are to be combined.
  [in] | options | Options for combining PDF documents. Please refer to values starting from Combination::e_CombineDocsOptionBookmark and this can be one or a combination of these values. 0 means no option is used.
  [in] | pause | Pause object which decides if the combining process needs to be paused. This can be NULL which means not to pause during the parsing process. If this is not NULL, it should be a valid pause object implemented by user. Default value: NULL.

Returns
  A progressive object. Please check the rate of current progress by function common::Progressive::GetRateOfProgress. If the rate is not 100 yet, call function common::Progressive::Continue to continue the progress until the progress is finished.

## ◆ StartCombineDocuments() [2/3]

static common::Progressive foxit::pdf::Combination::StartCombineDocuments | ( | const wchar_t * | dest_file_path,
|  | const CombineDocumentInfoArray & | document_array,
|  | uint32 | options,
|  | common::PauseCallback * | pause = `0`
| ) |  |
| static

Start to combine PDF files.

It may take a long time to combining documents, so Foxit PDF SDK uses a progressive process to do this. This function does not support to combine XFA document.

Parameters

  [in] | dest_file_path | A full path to save the combined result PDF file. This should not be an empty string.
  [in] | document_array | An information array which represents information of source PDF files which are to be combined.
  [in] | options | Options for combining PDF documents. Please refer to values starting from Combination::e_CombineDocsOptionBookmark and this can be one or a combination of these values. 0 means no option is used.
  [in] | pause | Pause object which decides if the combining process needs to be paused. This can be NULL which means not to pause during the parsing process. If this is not NULL, it should be a valid pause object implemented by user. Default value: NULL.

Returns
  A progressive object. Please check the rate of current progress by function common::Progressive::GetRateOfProgress. If the rate is not 100 yet, call function common::Progressive::Continue to continue the progress until the progress is finished.

## ◆ StartCombineDocuments() [3/3]

static common::Progressive foxit::pdf::Combination::StartCombineDocuments | ( | foxit::common::file::WriterCallback * | dest_file,
|  | const CombineDocumentInfoArray & | document_array,
|  | uint32 | options,
|  | foxit::common::PauseCallback * | pause = `0`
| ) |  |
| static

Start to combine PDF files.

It may take a long time to combining documents, so Foxit PDF SDK uses a progressive process to do this. This function does not support to combine XFA document.

Parameters

  [in] | dest_file | A common::file::WriterCallback object which is implemented by user to store the data of combined result PDF file in custom method.
  [in] | document_array | An information array which represents information of source PDF files which are to be combined.
  [in] | options | Options for combining PDF documents. Please refer to values starting from Combination::e_CombineDocsOptionBookmark and this can be one or a combination of these values. 0 means no option is used.
  [in] | pause | Pause object which decides if the combining process needs to be paused. This can be NULL which means not to pause during the parsing process. If this is not NULL, it should be a valid pause object implemented by user. Default value: NULL.

Returns
  A progressive object. Please check the rate of current progress by function common::Progressive::GetRateOfProgress. If the rate is not 100 yet, call function common::Progressive::Continue to continue the progress until the progress is finished.