Warm tip: This article is reproduced from stackoverflow.com, please click
asp.net c# ocr

IronOcr reads text locally, but blank text in remote server

发布于 2020-03-27 10:27:14

Whenever I attempt to read a PDF via OCR, it works correctly when running locally on my development machine, and all text parses correctly. However, the same code (and same license) in our remote server is reading blank text.

In the screenshot below, this is a remote debugger attached to the server and while I've confirmed it does read the file correctly (into fileBytes), invoking ReadPdf reads an empty string for text and finds no pages.

I'm not sure what can cause. I have checked folder permissions in Temp, set a custom temp directory, and still it reads blank. It also shows the same behavior when reading TIFF files (ReadMultiFrameTiff(...)) even when a file path is used in the parameter.

Note: PdfReader is another library that is only used to get the page numbers.

Thanks!

enter image description here

Questioner
Ryan Peters
Viewed
191
Ryan Peters 2019-11-06 20:19

In this case, the solution was updating the Visual C++ runtimes (both x86 and x64) on the remote server. Apparently the remote server did not have the latest version installed.

These other suggestions were from their support ticket that I had tried prior to updating the runtimes: