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

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, June 23, 2017 11:24:58 AM(UTC)

Walter  
Walter

Groups: Tech Support, Administrators
Posts: 368

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.

  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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:17:43 PM(UTC)  | Reason: Not specified

Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, September 17, 2018 12:52:50 PM(UTC)
BonzoFestoon

Groups: Administrators
Posts: 26

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.
File Attachment(s):
ConvertToPdf.zip (349kb) downloaded 183 time(s).


For more information, see our blog post:
Merge and Convert to PDF Blog Post
Gabriel Smith
LEAD Technologies, Inc.

LEAD Logo
 
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.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.287 seconds.