Tesseract.NET in C# - c#

Do you know of step by step guide of how to use bins and dlls in http://www.pixel-technology.com/freeware/tessnet2/
I spent 2 days trying to use this by when compiling i am being asked for a dll that do not exist in the zip file i downloaded from the site.
Any help will be greatly appreciated.

You need the Leptonica DLL for Windows. You can download it from http://www.leptonica.com/download.html, or direct link to the specific zip is here. You need to copy the lib & include folders into the Google Tesseract vs2008 folder (ie, create vs2008\lib and vs2008\include).

download the binaries here: http://www.pixel-technology.com/freeware/tessnet2/bin.zip
select the project and rightclick in the project explorer → Add reference → Browse...
select the dll version that is compatible with your build settings (x86 or x64) see the properties of your project
do a rebuild
Remove all installations of the tesseract bins from 3.0 also cleanup your registry (took me hours to find this one out).

VietOCR.NET is a working program of tessnet2 library. It is an open-source application.

Related

SDK Rich Presence Discrod С# | Can't figure out how to create rich presence via SDK Discord

I am trying to install the Discord SDK for my C # console project for the sake of a test, but I am failing.
I have very little interaction with Visual Studio, with which I write the code, so please help with installing the SDK. I try to do everything according to what was said below, but perhaps I do not fully understand the sequence:
Open up that SDK zip that you downloaded.
Create a folder in your project directory called DiscordGameSDK and
copy the contents of the csharp/ folder to it
Build your solution then place the .dll in the directory of the .exe
(either x86 or x86_64 version depending on your compile platform).
If you compile for Any CPU you may need to perform additional
wrapping around DLL importing (like setting the DLL directory
dynamically) to make sure you load the correct DLL.
https://discord.com/developers/docs/game-sdk/sdk-starter-guide
I don't quite understand the third line of actions related to the solution, dll and exe files
Thanks in advance!
Since I'm writing in VS Code, I created a Discord Game SDK folder in my console project and moved all the files from the csharp folder to the DiscordGameSDK folder. After that, I compiled the project and transferred all the files from the lib folder to the bin/Debug/net6.0 folder
Visual Studio should work the same way. (Not sure)
enter image description here

Library dependencies for pdfiumViewer?

i got some troubles to display a pdf using pdfium using c#. I read this other question:
Read a stored PDF from memory stream
i downloaded the pdfiumViewer package, but when i compile it, it says that it can't find the pdfium library. So, I downloaded the package "pdfium.net SDK" so it's working but it's not free, it's limited version. what i was wondering is : do we must have the package "pdfium.net SDK" to have the "pdfiumViewer" working" ?
thx !
The SDK you found, which I guess is Patagames's Pdfium.Net SDK, which is indeed a paid solution.
PdfiumViewer is free, but you have to have pdfium built, which is pretty thoroughly documented.
Pdfium.dll is already integrated into PdfiumViewer. But for it to be loaded, you need when building your project, to copy this file next to your application, either in the root or the x86 or x64 sub directory. The easiest way to accomplish this is by changing the properties of that file, changing the Copy to Output Directory setting to Copy always.
Try the NuGet package "PdfiumViewer". Works like a charm!
In my case*, I needed the NuGet Package PdfiumViewer.Native.x86.v8-xfa, which adds the needed DLL.
Got it running after 10 minutes with this code.
*) Visual Studio 2019 Pro, Windows 10 x64 Pro

Can get referenced dll's using the svn projects

I am beginner with SVN projects ( Working SVN with ASP.NET MVC3 c# ). I use ankhsvn in
my project.
I load my project in other pc with File -> Open -> Subversion Project
But i found some dlls are missing in the solution explorer.
I explore project folders, there is some folders are without tick icon,
and some reference dlls are packages folder. this folder is with out the tick icon
Please see this images below.
How can i solve this issue. Please Help.
May be the reference path is different after downloading. You can define the correct path

What reference do I need to use Microsoft.Office.Interop.Excel in .NET?

I am interested in using C# to manipulate/Automate Excel files.
After browsing the web I have found VSTO but it seems you can not use that in Visual Studio Express Edition so I can not use that.
Just few minutes ago I noticed a question in this site that used this namespace in its code:
Microsoft.Office.Interop.Excel
So I am wondering if all I need to use that is add necessary reference and if so which reference to add?
UPDATE
I installed "Primary Interop Assemblies" as the accepted answer suggested but for some reason they are still missing in the Add Reference dialog under ".NET" but they are present in GAC.
So I just added the reference using "Browse" and located Microsoft.Office.Interop.Excel.dll in GAC folder.
But looking for similar questions on this site regarding adding reference from GAC it seems this is not recommended.
Update (thanks user2347528)
These assemblies are available as NuGet packages, which is much easier than my original answer.
You can install by either right clicking on References in your project and selecting Manage NuGet packages... and searching for one of the packages listed below, or install using the Package Manager Console:
PM> Install-Package Microsoft.Office.Interop.Excel
Microsoft.Office.Interop.Excel
Microsoft.Office.Interop.Word
Microsoft.Office.Interop.Outlook
Microsoft.Office.Interop.PowerPoint
Microsoft.Office.Interop.Graph
These are available as "Primary Interop Assemblies", which can be installed with Office, or downloaded and installed separately. How to: Install Office Primary Interop Assemblies.
Once those are installed, you can reference them in your project in the Add Reference dialog, under .NET. If you do not see those Microsoft.Office.Interop assemblies listed, then they have not been installed yet. Install them from your setup, or download and install them separately (see my link above for the downloads).
Just had this problem myself and accepted answer didn't help me but I solved it with:
Add reference > Browse > C: > Windows > assembly > GAC > Microsoft.Office.Interop.Excel > 12.0.0.0_etc > Microsoft.Office.Interop.Excel.dll
Answers didn't help me to solve my problem, I couldn't find (and browse) the assemblies although I installed them using Microsoft's msi installer. For me, the excel assembly is located under C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Excel\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Excel.dll
Just add reference of Microsoft.Office.Interop.Excel.
It includes MicroSoft Excel related classes, no need to add more references.
I guess what you are trying to do is add Microsoft.Office.Interop.Excel with using statement with out adding its reference in your application, in that case it wont be found. Before calling it with using statement you need to add a reference to ur application. Right click on References and add the Excel Interop reference.
Add reference > Browse > C: > Windows > assembly > GAC > Microsoft.Office.Interop.Excel > 12.0.0.0_wasd.. > Microsoft.Office.Interop.Excel.dll
I found it located under Assemblies->Extensions in VS2013.
If you have Microsoft Office installed, then you should be able to add a reference to Interop.Excel.
For example, the PC I'm typing this on has MSVS 2010 C# Express and Office 2010. I can add a reference to Microsoft.Office.Interop.Excel 11.0.0.0.
'Hope that helps
its in the com component, named:
"Microsoft Office 14 Object Library"
I just had the same problem, but none of these answers helped me. I did find the dll on my pc in the location Mostey noted: (C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Excel\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Excel.dll), but this is not the one that was referenced in the project I was trying to get building.
The reference in our project in Visual Studio 2012 was pointing to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Visual Studio Tools for Office\. This location was empty for me, but it worked fine for everyone else. It took a number of tries, but I finally tracked down a working installer. I hope this saves others the same hassle!
--> Office Tools Bundle installer for VS2012 <--
This was located on the Office Documentation and Download page. Scroll down to Tools Downloads. There's also currently one for VS2013.
The best option since office 2007 is using Open XML SDK for it.
We used Word.Interop but it halt sometimes, and it is not recommend for Microsoft, to use it as a server side document formatting, so Open XML SDK lets you creates word documents on DOCX and Open XML formats very easily.
It lets you going well with scability, confidence ( the files, if it is corrupted can be rebuild ), and another very fine characteristics.
Here is super solid solution, you just need have excell.dll in your Debug/Release folder
Mine is 77,824 bytes, I downloaded it as a file, this also explain why some people have Debug compiled but Release not or vice versa.
Trento
1.Download and install: Microsoft Office Developer Tools
2.Add references from:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Visual Studio Tools for Office\PIA\Office15
I had the same issue and the Microsoft.Office.Interop was not appearing in "Add Reference" option once I upgraded VS2012 to VS2015. I basically repaired the installation (Control Panel > Programs & Features > VS 2012 > Right click Change > Repair) and added the Microsoft Office component. After that the same solution started working.
Make sure your project is 32 bit.
I had this problem, as soon as I ticked "Prefer 32 bit and rebuilt" all the Office Interop assemblies where available in Reference->Assemblies->Search "Office".

Error Message when Referencing .dll Files

I would like the use DirectInput in my XNA game however I'm having an issue when it comes to referencing the .dll file. I'm using Microsoft Visual Studio C# Express Edition. This is exactly what I do:
right click "References"
chose "add reference"
navigate to the .dll file and hit OK
I then receive the following error:
As stated above I would like to reference the Microsoft.DirectX.DirectInput namespace but I don't know which .dll file that it's in so I just picked the "d3dref9.dll". Every .dll file under that directory doesn't work though so any one I pick gives me the same error. Now I've been able to accomplish this with other .dll files but for some reason the DirectX ones wont work. I know it's possible beacuse this guy did it just look at the second line in his code.
I have the DirectX SDK installed why can't I reference any of the .dll files and how can I make it so I can?
Thanks!
The problem here is that you are adding a reference to a native DLL while managed projects only support managed DLLS. I believe the DLL you are looking for is Microsoft.DirectX.dll. That has the managed wrappers for DirectX
I think you are trying to reference .dlls that are not .NET assemblies, and/or not COM libraries.
This link might help with locating the propper .dlls:
(copy/paste from linked post:)
What you need to do is add the correct DLLs as references to your
project. Since they are not in the list, you'll have to add them
manually. I am assuming you are using the October SDK?
What you'll need to do is:
Right-click on References folder, and select "Add Reference..."
On the .NET tab, select the "Browse" button.
Navigate to where you installed the SDK. (On my machine it is C:\Program Files\Microsoft DirectX 9.0 SDK)
The files you are looking for should be in ".\Developer Runtime\x86\DirectX for Managed Code"
Select the DLLs that you want (in this case Microsoft.DirectX.dll, Microsoft.DirectX.DirectInput.dll)

Categories