Page 1 of 1

cmd.document.OCRPages not launching anything

Posted: Sat Feb 06, 2016 4:53 pm
by docu-track99
Hello gents,

I'm trying to figure out how to access OCR pages within the Editor SDK. :roll: It doesn't seem to launch anything when I use the Execute button in the Command tab of your demo. Is there any reason for this? Is it currently implemented within the SDK :?:

Thanks,
Doc.It Development

Re: cmd.document.OCRPages not launching anything

Posted: Mon Feb 08, 2016 10:36 am
by Sasha - Tracker Dev Team
Hello docu-track99,

The problem is that you did not include the OCR plugin in your code.
Here's the code that needs to be evaluated for the correct work of the OCR (also read the comments provided):

Code: Select all

					//Note that plugins must be loaded before the initialization of the control after you've initialized Instance
					Inst.StartLoadingPlugins();
					//Also, the project should contain the PluginsData folder and within it there should be the OCRLanguages folder with dictionaries for the correct command work
					Inst.AddPluginFromFile("..\\Plugins\\OCRPlugin.pvp");
					Inst.FinishLoadingPlugins();
Cheers,
Alex

Re: cmd.document.OCRPages not launching anything

Posted: Mon Feb 08, 2016 9:26 pm
by docu-track99
Great, thanks for the help.

So I've got the OCR plugin loading correctly now, however I don't have the languages installed. I'm unclear on where the PluginsData folder should go. I've tried including it in several ways but I still get "Languages: No any installed" in the OCR dialog.

Thanks!

Re: cmd.document.OCRPages not launching anything

Posted: Mon Feb 08, 2016 9:31 pm
by Will - Tracker Supp
Hi docu-track99,

I'm not a developer, so I'll leave that particular question for Sasha, or another of the Dev. Team.

I'm posting because I'm interested in the dialogue that says "Languages: No any installed" - can you please upload a screen-shot so that I can have the Dev. Team fix the grammar?

Thanks,

Re: cmd.document.OCRPages not launching anything

Posted: Mon Feb 08, 2016 10:13 pm
by docu-track99
Sure thing! What's your preferred method for uploading screenshots? It seems that uploading attachments refuses .png, .bmp, .jpeg and .tif.

Re: cmd.document.OCRPages not launching anything

Posted: Mon Feb 08, 2016 10:57 pm
by Will - Tracker Supp
Hi docu-track99,

Any is fine, but it will need to be uploaded in a .zip folder or RAR/7Zip archive, otherwise the forums will reject the upload.

Cheers,

Re: cmd.document.OCRPages not launching anything

Posted: Tue Feb 09, 2016 7:59 am
by Sasha - Tracker Dev Team
Hi docu-track99,

The plugins data folder should go in the same folder where the PDFXEditCore.dll lies.
It's the same PluginsData folder that is included when the Editor is installed.
Image

HTH

Re: cmd.document.OCRPages not launching anything

Posted: Tue Feb 09, 2016 4:42 pm
by docu-track99
Here you go!

Re: cmd.document.OCRPages not launching anything

Posted: Tue Feb 09, 2016 6:30 pm
by docu-track99
I can see have the PluginsData folder in the correct location in the PDF Editor. I'm also able to load the OCR form thanks to the code from above. But it still won't load any languages when I load the OCR form from the demo solution.

I'm attaching the original Tracker v5 Demo solution, but I have a modified version of it which enables OCR. How can I get the languages to load in this demo solution?

Is there any other code I need to run to set the languages? If I want access to the languages in the Tracker v5 Demo solution, should it be sufficient to simply have the PluginsData folder present in C:\Program Files\Tracker Software\PDF Editor ?

Not sure what else I can try to get the languages to show up.

Thanks,
Doc.It Development

Re: cmd.document.OCRPages not launching anything

Posted: Wed Feb 10, 2016 9:58 am
by Sasha - Tracker Dev Team
Hello docu-track99,

As I said before - the PluginsData folder must be where the registered PDFXEditCore.dll lies. Then it will work.
If it's the dll from the C:\Program Files\Tracker Software\PDF Editor then yes - the PluginsData will be read there.
If you used regsvr32 to register the PDFXEditCore.dll from custom folder (for example inside your project) then the PluginsData folder must be near it.
Don't forget that the PluginsData folder must contain the OCRLanguages folder with at least one valid language file.

Cheers,
Alex

Re: cmd.document.OCRPages not launching anything

Posted: Wed Feb 10, 2016 5:06 pm
by docu-track99
Thanks Alex,

What I wasn't doing properly was I didn't register the .dll. I had to register it with regsvr32 using the command prompt as admin. I believe I also added the reference to the .dll in my project, but for some reason I can't see the reference in my project, so I'm not sure if this was necessary or not. In any case, it's working now.

Thanks for all your help.

Regards,
Doc.It Development

Re: cmd.document.OCRPages not launching anything

Posted: Wed Feb 10, 2016 7:26 pm
by Sasha - Tracker Dev Team
Glad that worked for you :wink:

Re: cmd.document.OCRPages not launching anything

Posted: Mon Mar 21, 2016 9:23 pm
by docu-track99
Hello folks,

I just noticed that if you cancel an OCR operation it appears to crash the control (cancel while it is OCRing pages).

Regards,
Doc.It Development

Re: cmd.document.OCRPages not launching anything

Posted: Tue Mar 22, 2016 7:34 am
by Sasha - Tracker Dev Team
Hello docu-track99,

Please confirm on what are you using - the OCR command or the OCR operation. Also, please paste a code sample with the problem so we can test on our side.

Cheers,
Alex

Re: cmd.document.OCRPages not launching anything

Posted: Tue Mar 22, 2016 1:42 pm
by docu-track99
Hi Alex,

Probably you can reproduce it on your side without a code sample. I'm just using your OCR Pages menu option. While the document is being OCR'ed (when the progress bar is shown), simply click cancel during the operation.

Regards,
Doc.It Development

Re: cmd.document.OCRPages not launching anything

Posted: Tue Mar 22, 2016 3:43 pm
by Sasha - Tracker Dev Team
Hello docu-track99,

This is a bug and it will be fixed in one of the future releases.

Cheers,
Alex

Re: cmd.document.OCRPages not launching anything

Posted: Tue Mar 22, 2016 4:08 pm
by claude vidal
This issue has a strange behavior for me. Cancelling an OCR command will not always crash the Editor.

When it does, it does so after a certain delay (~ 5 secs?). After cancelling the OCR, I'm able to perform other commands on the same document then, all of a sudden, the Editor's process gets killed.

Re: cmd.document.OCRPages not launching anything

Posted: Tue Mar 22, 2016 8:29 pm
by Sasha - Tracker Dev Team
Hello claude vidal,

The thing is that the Cancel is not yet being implemented inside the operation itself thus the results are not valid and these problems occur. We know about this and will try to fix this in the nearest future.

Cheers,
Alex

Re: cmd.document.OCRPages not launching anything

Posted: Tue Apr 05, 2016 3:27 pm
by docu-track99
Hi folks,

When I launch the OCR Pages command the control is crashing. I believe that perhaps since I updated to build 317 this broke the OCR. The OCR plugin I'm using is still from 316. Has this been updated? Where can I download the OCR plugin if there is a new version?

Thanks,
Doc.It Development

Re: cmd.document.OCRPages not launching anything

Posted: Tue Apr 05, 2016 3:50 pm
by docu-track99
Please disregard, I had to download the standard free version of the PDF X Editor to get my hands on the new plugins as they don't come packaged with the SDK (as I hoped they would).

Thanks,
Doc.It Development

Re: cmd.document.OCRPages not launching anything

Posted: Tue Apr 05, 2016 7:19 pm
by Will - Tracker Supp
:)

Re: cmd.document.OCRPages not launching anything

Posted: Fri Apr 15, 2016 6:12 pm
by jeffp
--

Re: cmd.document.OCRPages not launching anything

Posted: Fri Apr 15, 2016 7:46 pm
by Sasha - Tracker Dev Team
:?: