logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
gafforelli  
#1 Posted : Friday, October 12, 2018 4:15:49 PM(UTC)
gafforelli

Rank: Newbie

Groups: Registered
Joined: 4/7/2018(UTC)
Posts: 5
Brazil
Location: Santo Antonio da Patrulha

Thanks: 1 times
I have the 6 page tif document which takes approximately 120 seconds to be converted into searchable PDF.
This document has, in addition to the text, images, stamps and handwritten words.
Is there a param paramenter that can be added to the code to optimize the process?
In pure text the tessaract has a very good performance.


I am using the following code for conversion:

Sub OCR()
OcrApi.LicenseKey = "XXXXX-XXXX"
Try
Dim startTime As DateTime = DateTime.Now
Dim ocr = OcrApi.Create
ocr.Init(Languages.Portuguese, My.Application.Info.DirectoryPath & "\", OcrEngineMode.OEM_TESSERACT_ONLY)
Dim OutPdf = OcrPdfRenderer.Create("C:\OCR\" & Format(DateTime.Now, "yyyy-MM-dd-HHmmssfff"), My.Application.Info.DirectoryPath & "\tessdata\")
OutPdf.BeginDocument("Title")
Try
ocr.ProcessPages("c:\OCR\InputFile.tif", vbFalse, 0, OutPdf)
Catch ex As Exception
MsgBox(ex.Message)
End Try
OutPdf.EndDocument()
OutPdf.Dispose()
ocr.Dispose()
MsgBox("Concluido!" & Chr(13) & "Processado em " & DateDiff(DateInterval.Second, startTime, DateTime.Now) & " segundos")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub


Thank you for now
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.