Skip to content

Commit 0790545

Browse files
Merge pull request #24 from telerik/ani/tesseract
Made changes to SDK for the new Tesseract changes
2 parents 97585de + b4e11cf commit 0790545

File tree

9 files changed

+44
-23
lines changed

9 files changed

+44
-23
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ TestResults
1717
[Dd]ebug/
1818
[Rr]elease/
1919
x64/
20+
!PdfProcessing/TesseractOcrProviderDemo/x64
2021
*_i.c
2122
*_p.c
2223
*.ilk

PdfProcessing/TesseractOcrProviderDemo/App.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
88
<dependentAssembly>
99
<assemblyIdentity name="Telerik.Licensing.Runtime" publicKeyToken="98bb5b04e55c09ef" culture="neutral" />
10-
<bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
10+
<bindingRedirect oldVersion="0.0.0.0-1.6.5.0" newVersion="1.6.5.0" />
1111
</dependentAssembly>
1212
</assemblyBinding>
1313
</runtime>

PdfProcessing/TesseractOcrProviderDemo/ReadMe.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,17 @@
33
Since Q1 2025 the RadPdfProcessing library supports Optical Character Recognition (OCR). OCR is the electronic or mechanical conversion of images of typed, handwritten, or printed text into machine-encoded text from a scanned document.
44
This project demonstrates how to use [TesseractOcrProvider](https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/formats-and-conversion/ocr/ocrformatprovider) that allows you to import an image to get a RadFixedPage.
55

6+
## How to run the project locally
7+
8+
1. Download the DPL assemblies ( .NEt Framework 4.6.2) from your Telerik account: [Download Product Files](https://docs.telerik.com/devtools/document-processing/getting-started/download-product-files).
9+
10+
2. Paste the following assemblies in the **AssemblyReferences** folder:
11+
12+
* Telerik.Windows.Documents.Core.dll
13+
* Telerik.Windows.Documents.Fixed.dll
14+
* Telerik.Windows.Documents.Fixed.FormatProviders.Ocr.dll
15+
* Telerik.Windows.Documents.TesseractOcr.dll
16+
* Telerik.Windows.Zip.dll
17+
18+
3. Build the project and run it.
19+

PdfProcessing/TesseractOcrProviderDemo/TesseractOcrProviderDemo.csproj

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="packages\Telerik.Licensing.1.4.6\build\Telerik.Licensing.props" Condition="Exists('packages\Telerik.Licensing.1.4.6\build\Telerik.Licensing.props')" />
43
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
54
<PropertyGroup>
65
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -45,32 +44,28 @@
4544
<Reference Include="System.Data" />
4645
<Reference Include="System.Net.Http" />
4746
<Reference Include="System.Xml" />
48-
<Reference Include="Telerik.Licensing.Runtime, Version=1.4.6.0, Culture=neutral, PublicKeyToken=98bb5b04e55c09ef, processorArchitecture=MSIL">
49-
<HintPath>packages\Telerik.Licensing.1.4.6\lib\net462\Telerik.Licensing.Runtime.dll</HintPath>
47+
<Reference Include="Telerik.Licensing.Runtime, Version=1.6.5.0, Culture=neutral, PublicKeyToken=98bb5b04e55c09ef, processorArchitecture=MSIL">
48+
<HintPath>packages\Telerik.Licensing.1.6.5\lib\net462\Telerik.Licensing.Runtime.dll</HintPath>
5049
</Reference>
5150
<Reference Include="Telerik.Windows.Documents.Core, Version=2025.1.205.462, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
5251
<SpecificVersion>False</SpecificVersion>
53-
<HintPath>Trial 4.6.2\Telerik.Windows.Documents.Core.dll</HintPath>
52+
<HintPath>AssemblyReferences\Telerik.Windows.Documents.Core.dll</HintPath>
5453
</Reference>
5554
<Reference Include="Telerik.Windows.Documents.Fixed, Version=2025.1.205.462, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
5655
<SpecificVersion>False</SpecificVersion>
57-
<HintPath>Trial 4.6.2\Telerik.Windows.Documents.Fixed.dll</HintPath>
56+
<HintPath>AssemblyReferences\Telerik.Windows.Documents.Fixed.dll</HintPath>
5857
</Reference>
5958
<Reference Include="Telerik.Windows.Documents.Fixed.FormatProviders.Ocr, Version=2025.1.205.462, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
6059
<SpecificVersion>False</SpecificVersion>
61-
<HintPath>Trial 4.6.2\Telerik.Windows.Documents.Fixed.FormatProviders.Ocr.dll</HintPath>
60+
<HintPath>AssemblyReferences\Telerik.Windows.Documents.Fixed.FormatProviders.Ocr.dll</HintPath>
6261
</Reference>
6362
<Reference Include="Telerik.Windows.Documents.TesseractOcr, Version=2025.1.205.462, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
6463
<SpecificVersion>False</SpecificVersion>
65-
<HintPath>Trial 4.6.2\Telerik.Windows.Documents.TesseractOcr.dll</HintPath>
64+
<HintPath>AssemblyReferences\Telerik.Windows.Documents.TesseractOcr.dll</HintPath>
6665
</Reference>
6766
<Reference Include="Telerik.Windows.Zip, Version=2025.1.205.462, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
6867
<SpecificVersion>False</SpecificVersion>
69-
<HintPath>Trial 4.6.2\Telerik.Windows.Zip.dll</HintPath>
70-
</Reference>
71-
<Reference Include="Tesseract, Version=5.2.0.0, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
72-
<SpecificVersion>False</SpecificVersion>
73-
<HintPath>Trial 4.6.2\Tesseract.dll</HintPath>
68+
<HintPath>AssemblyReferences\Telerik.Windows.Zip.dll</HintPath>
7469
</Reference>
7570
</ItemGroup>
7671
<ItemGroup>
@@ -80,23 +75,34 @@
8075
<ItemGroup>
8176
<None Include="App.config" />
8277
<None Include="packages.config" />
78+
<None Include="tessdata\deu.traineddata" />
79+
<None Include="tessdata\eng.traineddata" />
80+
<None Include="tessdata\spa.traineddata" />
8381
</ItemGroup>
8482
<ItemGroup>
8583
<Content Include="images\image.png" />
86-
<Content Include="Trial 4.6.2\Telerik.Windows.Documents.Core.dll" />
87-
<Content Include="Trial 4.6.2\Telerik.Windows.Documents.Fixed.dll" />
88-
<Content Include="Trial 4.6.2\Telerik.Windows.Documents.Fixed.FormatProviders.Ocr.dll" />
89-
<Content Include="Trial 4.6.2\Telerik.Windows.Documents.TesseractOcr.dll" />
90-
<Content Include="Trial 4.6.2\Telerik.Windows.Zip.dll" />
91-
<Content Include="Trial 4.6.2\Tesseract.dll" />
84+
<Content Include="x64\leptonica-1.82.0.dll">
85+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
86+
</Content>
87+
<Content Include="x64\tesseract50.dll">
88+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
89+
</Content>
90+
<Content Include="x86\leptonica-1.82.0.dll">
91+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
92+
</Content>
93+
<Content Include="x86\tesseract50.dll">
94+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
95+
</Content>
96+
</ItemGroup>
97+
<ItemGroup>
98+
<Folder Include="AssemblyReferences\" />
9299
</ItemGroup>
93100
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
101+
<Import Project="packages\Telerik.Licensing.1.6.5\build\Telerik.Licensing.targets" Condition="Exists('packages\Telerik.Licensing.1.6.5\build\Telerik.Licensing.targets')" />
94102
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
95103
<PropertyGroup>
96104
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
97105
</PropertyGroup>
98-
<Error Condition="!Exists('packages\Telerik.Licensing.1.4.6\build\Telerik.Licensing.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Telerik.Licensing.1.4.6\build\Telerik.Licensing.props'))" />
99-
<Error Condition="!Exists('packages\Telerik.Licensing.1.4.6\build\Telerik.Licensing.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Telerik.Licensing.1.4.6\build\Telerik.Licensing.targets'))" />
106+
<Error Condition="!Exists('packages\Telerik.Licensing.1.6.5\build\Telerik.Licensing.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Telerik.Licensing.1.6.5\build\Telerik.Licensing.targets'))" />
100107
</Target>
101-
<Import Project="packages\Telerik.Licensing.1.4.6\build\Telerik.Licensing.targets" Condition="Exists('packages\Telerik.Licensing.1.4.6\build\Telerik.Licensing.targets')" />
102108
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Telerik.Licensing" version="1.4.6" targetFramework="net462" />
3+
<package id="Telerik.Licensing" version="1.6.5" targetFramework="net462" />
44
</packages>
3.98 MB
Binary file not shown.
2.66 MB
Binary file not shown.
3.22 MB
Binary file not shown.
2.23 MB
Binary file not shown.

0 commit comments

Comments
 (0)