Page 1 of 1

OCR Problem in Web API

Posted: Thu Jan 20, 2022 4:57 pm
by jloizagah
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.

Re: OCR Problem in Web API

Posted: Thu Jan 20, 2022 5:39 pm
by Hugo
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

Re: OCR Problem in Web API

Posted: Thu Jan 20, 2022 6:54 pm
by jloizagah
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.

Re: OCR Problem in Web API

Posted: Fri Jan 21, 2022 6:17 pm
by Hugo
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

Re: OCR Problem in Web API

Posted: Wed Jan 26, 2022 2:06 pm
by jloizagah
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.

Re: OCR Problem in Web API

Posted: Wed Jan 26, 2022 5:47 pm
by Hugo
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

Re: OCR Problem in Web API

Posted: Mon Jan 31, 2022 5:17 pm
by jloizagah
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.

Re: OCR Problem in Web API

Posted: Tue Apr 25, 2023 9:29 am
by tracyberge
I suppouse it is a server configuration problem. Donkey Kong

Re: OCR Problem in Web API

Posted: Fri Aug 25, 2023 12:01 pm
by rlagrange
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.