ExportPages Method of the FRDocument Object
This method saves specified pages into a file in an external format. Available file formats are represented by the FileExportFormatEnum enumeration constants.
Note: If you want to export in parallel, keep in mind that the parallel processing is supported only for export to PDF (except TextOnly mode) and PPTX formats.
HRESULT ExportPages( BSTR ExportFileName, FileExportFormatEnum Format, IUnknown* ExportParams, IIntsCollection* PageIndices, IStringsCollection** AdditionalFiles, IStringsCollection** AdditionalDirectories );
void ExportPages( string ExportFileName, FileExportFormatEnum Format, object ExportParams, IIntsCollection PageIndices, out IStringsCollection AdditionalFiles, out IStringsCollection AdditionalDirectories );
Visual Basic .NET
Sub ExportPages( _ ExportFileName As String, _ Format As FileExportFormatEnum, _ ExportParams As Unknown, _ PageIndices As IIntsCollection, _ [ByRef AdditionalFiles As IStringsCollection = Nothing], _ [ByRef AdditionalDirectories As IStringsCollection = Nothing] _ )
- [in] This variable contains the full path to the output file. If this file already exists, it is overwritten without prompt.
- [in] This variable specifies the format of the output file. See the FileExportFormatEnum description for the supported file formats.
- [in] Pass the export parameters object of the type corresponding to your file format through this input parameter. For example, if you are saving the text into an RTF file, create an RTFExportParams object, set the necessary parameters in it, and pass it to this method as the ExportParams input parameter. This parameter may be 0, in which case the default values for the export parameters are used.
- [in] This parameter refers to the IntsCollection object that contains the numbers of pages to be exported. The pages are exported in the order they are located in the document. If you want to change the page order, you should renumber pages in the document using the Renumber method of the corresponding FRPages collection.
- [out] A pointer to the IStringsCollection* pointer variable that receives the interface pointer of the StringsCollection object. *AdditionalFiles should not refer to any valid object. The StringsCollection is created internally by this method. This object contains the list of full paths to the additional files that were generated during export.
- [out] A pointer to the IStringsCollection* pointer variable that receives the interface pointer of the StringsCollection object. *AdditionalDirectories should not refer to any valid object. The StringsCollection is created internally by this method. This object contains the list of full paths to the additional directories that were generated during export.
During export to PDF or XPS format this method may return FREN_E_INVALID_CREATION_DATE_FORMAT or FREN_E_INVALID_MODIFICATION_DATE_FORMAT errors, which indicate that the creation or modification date format is invalid. It also returns the standard return codes of ABBYY FineReader Engine functions.
- In most cases, document synthesis must be performed before exporting pages of a document. Omitting the document synthesis may cause errors during export. See the description of the IFRDocument::SynthesizePages method for details.
- This method may report events to the listeners attached to the IConnectionPointContainer interface of the FRDocument object.
- Depending on the value of the IEngine::MultiProcessingParams property, ABBYY FineReader Engine can distribute export of multi-page documents to CPU cores.