OCR Problem in Web API

Discussions about machine vision support in GdPicture.
Post Reply
jloizagah
Posts: 29
Joined: Tue Mar 17, 2009 2:45 pm

OCR Problem in Web API

Post by jloizagah » Thu Jan 20, 2022 4:57 pm

Hello. We are programming a REST Web API (.Net) to perform OCR and extract information from PDF's. In a Desktop project it works fine. In a local environment, Web API works fine also (localhost), but when we try it in production environment, we have an error just in this point:


if (gdPicturePDF.OcrPages("*", 0, "spa", basePath, "", 200) != GdPictureStatus.OK)
{
status = gdPicturePDF.GetStat();
gdPicturePDF.CloseDocument();
gdPicturePDF.Dispose();

throw new Exception(string.Concat("Error OCR. Error: ", status.ToString()));
}

and the status error is "Aborted". We have test it with a lot of PDF's, so the pdf file is not the problem. I am using Gdpicture 14.1.0.106.

Hugo
Posts: 227
Joined: Tue Dec 18, 2018 10:09 am

Re: OCR Problem in Web API

Post by Hugo » Thu Jan 20, 2022 5:39 pm

Hi there,

Thank you for your feedback.

Could you first of all update to our latest version as we may have already fixed this?
https://www.gdpicture.com/download-gdpicture/

Let me know if your issue persists.

Regards,
Hugo Cudd
Technical Support

jloizagah
Posts: 29
Joined: Tue Mar 17, 2009 2:45 pm

Re: OCR Problem in Web API

Post by jloizagah » Thu Jan 20, 2022 6:54 pm

Hello Hugo. I have just upload GDPicture to 14.1.0.148 but the problem persist. I have an "Aborted" status performing OCR to a PDF File.

Best regards.

Hugo
Posts: 227
Joined: Tue Dec 18, 2018 10:09 am

Re: OCR Problem in Web API

Post by Hugo » Fri Jan 21, 2022 6:17 pm

Hi,

Thank you for confirming this.

I would therefore be needing a code project to be able to investigate the issue further and reproduce it on my end.
Could you provide this please? If you cannot do so here, you can contact us and provide this here:
https://orpalis.zendesk.com/hc/en-us/requests/new

Regards,
Hugo Cudd
Technical Support

jloizagah
Posts: 29
Joined: Tue Mar 17, 2009 2:45 pm

Re: OCR Problem in Web API

Post by jloizagah » Wed Jan 26, 2022 2:06 pm

Hello Hugo. Forget all about this issue. I have test our solution in other Server and it works fine. So I suppouse it is a server configuration problem.

Thank you for your time.

Best regards.

Hugo
Posts: 227
Joined: Tue Dec 18, 2018 10:09 am

Re: OCR Problem in Web API

Post by Hugo » Wed Jan 26, 2022 5:47 pm

Hi,

Thank you for further investigating this on your end before sending this our way for ivnestigations.

If you need any further help in future do not hesitate to contact us directly on our support platform.
I hope you are able to solve your issue on your end.
Have a nice day.

Regards,
Hugo Cudd
Technical Support

jloizagah
Posts: 29
Joined: Tue Mar 17, 2009 2:45 pm

Re: OCR Problem in Web API

Post by jloizagah » Mon Jan 31, 2022 5:17 pm

Hello Hugo. I have just found the reason of this issue, but I really don't know how to solve it. Rest API Service (or WCF service) fails to permorm OCR in a PDB fie, thrpwing the error "Aborted" if we use in IIS an Application pool diferent from DeafaultApplicationPool. No matter if you create an application pool with the same configuration of DefaultApplication pool. OCR only works with DefaultApplicationPool.

Best regards.

tracyberge
Posts: 1
Joined: Tue Apr 25, 2023 9:28 am

Re: OCR Problem in Web API

Post by tracyberge » Tue Apr 25, 2023 9:29 am

I suppouse it is a server configuration problem. Donkey Kong

rlagrange
Posts: 30
Joined: Tue May 02, 2017 5:51 pm

Re: OCR Problem in Web API

Post by rlagrange » Fri Aug 25, 2023 12:01 pm

Very late, but you can register to FirstChanceException to get the initial internal exception, or attach a debugdiag on the production server to log it but you'll need to install the gdpicture sdk and register your license.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest