I have noticed that the OCR engine of the PDFX Change Editor (version 7) requires significantly less time for text recognition than my own implementation.
The editor needed about 30 seconds for text recognition for a test document, whereas my implementation, with the same settings, took 3 minutes.
Is there a way to make my implementation as fast as the Editor?
I also used this code, as described in this forum viewtopic.php?f=66&t=33528&p=141558&hil ... ty#p141558 :
Code: Select all
pdfCtl.Inst.Settings["Performance.MaxThreads"].v = 16;
pdfCtl.Inst.Settings["Performance.MaxBackgroundThreads"].v = 8;
pdfCtl.Inst.FireAppPrefsChanged(PDFXEdit.PXV_AppPrefsChanges.PXV_AppPrefsChange_Performance);
Snippet of the Code I use:
Code: Select all
Try
docAFSName = FsInst.DefaultFileSys.StringToName(inputpdf)
resDoc = MPxcInst.OpenDocumentFrom(docAFSName, Nothing)
Inputcab = Op_OCR.Params.Root("Input")
Outputcab = Op_OCR.Params.Root("Output")
Inputcab.v = resDoc
options = Op_OCR.Params.Root("Options")
options("PagesRange.Type").v = "All"
options("ExtParams.Accuracy").v = iOCRDPI
options("ExtParams.Language").v = "deu+eng" & sAddationalLanguages
If Not AutoDeskew Then
options("OutputType").v = 0
Else
options("OutputType").v = 1
options("OutputDPI").v = 0
End If
options("ExtParams.AutoDeskew").v = AutoDeskew
MInst.AsyncDoAndWaitForFinish(Op_OCR, CUInt(OpExecFlags.OpExecFlag_NoUI Or OpExecFlags.OpExecFlag_NoProgress))
If AutoDeskew Then
outputDoc = CType(Outputcab.v, IPXC_Document)
End If
Catch
Environment.ExitCode = PDFXEDIT_OPERATION_FAILURE
Environment.Exit(Environment.ExitCode)
End Try
Many thanks in advance.