#1
Posted
:
Friday, June 23, 2017 11:19:58 AM(UTC)
Groups: Tech Support
Posts: 366
Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
A common need for developers is a simple example getting started with LEADTOOLS OCR. Below is a list of forum posts with OCR projects in various languages to help illustrate the minimum amount of code necessary to get started with OCR. They are all designed to be starter projects upon which other features can be added to test out LEADTOOLS features.
- Description: Minimum OCR to text demo
Language: C#
Engine: Plus
Versions: 16
Address: https://www.leadtools.com/support/forum/posts/t12228-How-To--Minimum-OCR-to-text-demo-using-OCR-Plus--C---NET
- Description: Minimum OCR to text demo
Language: C#
Engine: Professional
Versions: 16.5, 17.5, 18
Address: https://www.leadtools.com/support/forum/posts/t12224-How-To--Minimum-OCR-to-text-demo-using-OCR-Professional--C---NET
- Description: Minimum OCR to text demo
Language: C
Engine: Professional
Versions: 17, 18, 19
Address: https://www.leadtools.com/support/forum/posts/t12225-How-To--Minimum-OCR-to-text-demo-using-OCR-Professional--C-DLL
- Description: Minimum OCR to text demo using C DLL interop
Language: Delphi
Engine: Professional
Versions: 17, 17.5, 18
Address: https://www.leadtools.com/support/forum/posts/t12226-How-To--Minimum-OCR-to-text-demo-using-OCR-Professional--Delphi
- Description: Simple OCR demo with verification callback
Language: C
Engine: Professional
Versions: 17.5
Address: https://www.leadtools.com/support/forum/posts/t12229-Simple-CDLL-OCR-demo-with-verification-callback
- Description: Minimum OCR to text demo using C DLL interop
Language: VB6
Engine: Professional
Versions: 17.5
Address: https://www.leadtools.com/support/forum/posts/t12230-How-To--Minimum-OCR-to-text-demo-using-OCR-Professional--VB6
- Description: Minimum OCR demo for the web
Language: Javascript/C#
Engine: Professional
Versions: 17.5
Address: https://www.leadtools.com/support/forum/posts/t12231-How-To--Minimum-OCR-demo-using-HTML5
- Description: Minimum OMR to text demo
Language: Delphi
Engine: Professional
Versions: 18
Address: https://www.leadtools.com/support/forum/posts/t12227-How-To--Minimum-OMR-to-text-demo--Delphi
- Description: Minimum OCR to text demo
Language: C#
Engine: Arabic
Versions: 18, 19
Address: https://www.leadtools.com/support/forum/posts/t6450-HOWTO--Minimum-Arabic-OCR-C--Console-Application
- Description: Minimum OCR to text demo
Language: C
Engine: Advantage/LEAD
Versions: 19, 20
Address: https://www.leadtools.com/support/forum/posts/t12233-How-To--Minimum-OCR-to-text-demo-using-OCR-Advantage--C-DLL
Edited by moderator Wednesday, June 19, 2019 4:12:43 PM(UTC)
| Reason: Not specified
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
#2
Posted
:
Monday, September 17, 2018 12:47:50 PM(UTC)
Groups: Administrators
Posts: 27
Was thanked: 1 time(s) in 1 post(s)
Uses a virtual LEADDocument and the DocumentConvert class to merge multiple files into one image over text searchable PDF file.
Code:private static void MergeAndConvertToPdf(IReadOnlyCollection<string> inputFiles)
{
Console.WriteLine();
ConsoleHelper.WriteStatus("Converting Files... ");
using (var documentConverter = new DocumentConverter())
{
var firstFile = GetFirst(inputFiles);
var outputFile = GetNewFilePath(firstFile);
var loadOptions = new LoadDocumentOptions {UseCache = false};
var createOptions = new CreateDocumentOptions {UseCache = false};
documentConverter.SetDocumentWriterInstance(GetDocumentWriter());
using (var ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD, false))
{
ocrEngine.Startup(null, null, null, null);
documentConverter.SetOcrEngineInstance(ocrEngine, false);
using (var masterDocument = DocumentFactory.Create(createOptions))
{
masterDocument.AutoDisposeDocuments = true;
foreach (var inputFile in inputFiles)
masterDocument.Pages.AddRange(DocumentFactory.LoadFromFile(inputFile, loadOptions).Pages);
var jobData =
DocumentConverterJobs.CreateJobData(masterDocument, outputFile, DocumentFormat.Pdf);
jobData.JobName = "merge and convert job";
var job = documentConverter.Jobs.CreateJob(jobData);
documentConverter.Jobs.JobOperation += JobOperationEventHandler;
documentConverter.Jobs.RunJob(job);
documentConverter.Jobs.JobOperation -= JobOperationEventHandler;
DisplayResultMessage(job, outputFile);
}
ocrEngine.Shutdown();
}
}
}
Full Visual Studio 2017 .NET Core 2 Console Application project is attached.
For more information, see our blog post:
Merge and Convert to PDF Blog PostGabriel Smith
LEAD Technologies, Inc.
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.