Merging multiple one-paged documents using Batch Processor of FineReader Engine

Question

Is it possible to merge a significant amount of one-paged documents into one?

Answer

The Batch Processor sample is designed to process a significant amount of one-paged documents.

As well as in combination with the FRPage and ExportFileWriter Methods documents can be merged into one PDF on export in the way described below.

// Create export file setting the name and extension
CheckResult(Engine->CreateExportFileWriter(resultDir + L "Out.pdf", FEF_PDF, 0, &fileWriter));

// Obtain recognized pages and export them to PDF format
CSafePtr<IFRPage> frPage;
CheckResult( batchProcessor->GetNextProcessedPage( &frPage ) );
while( frPage != 0 ) {
// Synthesize page before export
CheckResult( frPage->Synthesize( 0 ) );
//Adds page to export file
CheckResult(fileWriter->AddPage(frPage));
//Flush previous page from the memory
VARIANT_BOOL flushSuccessful;
CheckResult(frPage->Flush(VARIANT_FALSE, &flushSuccessful));
CheckResult(batchProcessor->GetNextProcessedPage(&frPage));
}
//Finalize and close the document
CheckResult(fileWriter->Close());

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.

Recently viewed