OCR Plugin - Languages: none installed SOLVED
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
OCR Plugin - Languages: none installed
Hi support.
I'm loading the OCRPlugin, and the "OCR Pages(s)..." menu item appears under "Document".
However, the "Languages" box lists no languages and the "Add/Update Languages..." is disabled.
What needs to be done for some languages to appear there?
p.s.
I've browsed the forum and "PluginsData" and "OCRLanguages" folders are mentioned, but none exist with my EU Editor installation:
-ž
-žarko
I'm loading the OCRPlugin, and the "OCR Pages(s)..." menu item appears under "Document".
However, the "Languages" box lists no languages and the "Add/Update Languages..." is disabled.
What needs to be done for some languages to appear there?
p.s.
I've browsed the forum and "PluginsData" and "OCRLanguages" folders are mentioned, but none exist with my EU Editor installation:
-ž
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: OCR Plugin - Languages: none installed
Hello žarko,
These should be added manually like the topic that you have found suggests.
Cheers,
Alex
These should be added manually like the topic that you have found suggests.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: OCR Plugin - Languages: none installed
Hi Alex,
I've added "OCRLanguages" under added "PluginsData" (same level where my EXE and sdk's DLL is) and I have placed there "eng.lng" and "eng_pxvocr.dat" (found on the forum from 2017) - but the combo is still empty.
-ž
I've added "OCRLanguages" under added "PluginsData" (same level where my EXE and sdk's DLL is) and I have placed there "eng.lng" and "eng_pxvocr.dat" (found on the forum from 2017) - but the combo is still empty.
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: OCR Plugin - Languages: none installed
Hello žarko,
Have you read all of the mentioned topic? From what I remember, the developer there had the same results as you described.
Cheers,
Alex
Have you read all of the mentioned topic? From what I remember, the developer there had the same results as you described.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: OCR Plugin - Languages: none installed
Hi Alex,
Different topics mention different needed layout. Some mention "Languages" folder at the same level where "plugins" folder is. Some mention "OCRLanguages" folder (under PluginsData).
So am not sure what to follow
(and I think I've tried all combinations)
-ž
Different topics mention different needed layout. Some mention "Languages" folder at the same level where "plugins" folder is. Some mention "OCRLanguages" folder (under PluginsData).
So am not sure what to follow
(and I think I've tried all combinations)
-ž
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: OCR Plugin - Languages: none installed
Hi žarko.
You need to organize such files in the following order:
HTH.
You need to organize such files in the following order:
Code: Select all
<EditorSdkFolder>
Common
Languages // all UI-languages
Dictionaries // all Spellcheck-dictionaries
Tesseract // all DefaultOCR languages
...
...
PDFXEditCore.x86.dll
PDFXEditCore.x64.dll
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: OCR Plugin - Languages: none installed
Hi Vasyl,
Thanks, unfortunately still nothing in the Languages combo, it is disabled and displays "None Installed", "Add/Update Languages" button is also disabled.
Here's how I have it:
I have also tried without the manifest - that is via standard regsvr - same results.
-ž
Thanks, unfortunately still nothing in the Languages combo, it is disabled and displays "None Installed", "Add/Update Languages" button is also disabled.
Here's how I have it:
I have also tried without the manifest - that is via standard regsvr - same results.
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: OCR Plugin - Languages: none installed
Hello žarko,
Will forward this one to Vasyl for investigation.
Cheers,
Alex
Will forward this one to Vasyl for investigation.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: OCR Plugin - Languages: none installed
Hi žarko.
The "Add/Update Languages" button is disabled in SDK-mode because at the moment we don’t want to overuse the our site by not our customers (i.e. - by your own customers). Sorry.
According to your problem with OCR-Languages: from your screenshot I see that you using too old lang-files. Try to use latest from the:
https://www.pdf-xchange.com/pdf-xchange-ocr
- here are different installers that adding lang-files for the installed PDFXEditor (end-user app), to the folder:
c:\Program Files\Tracker Software\Common\Tesseract
so after installing packs you will be able to copy all necessary files to your own folder.
HTH.
The "Add/Update Languages" button is disabled in SDK-mode because at the moment we don’t want to overuse the our site by not our customers (i.e. - by your own customers). Sorry.
According to your problem with OCR-Languages: from your screenshot I see that you using too old lang-files. Try to use latest from the:
https://www.pdf-xchange.com/pdf-xchange-ocr
- here are different installers that adding lang-files for the installed PDFXEditor (end-user app), to the folder:
c:\Program Files\Tracker Software\Common\Tesseract
so after installing packs you will be able to copy all necessary files to your own folder.
HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: OCR Plugin - Languages: none installed
Hi Vasyl,
Ok, that worked - after downloading and installing a few language packs a new "Common\Tesseract" folder was created under "Tracker Software" under "\Program Files".
The "Tesseract" folder has a bunch of ".lng" and ".dat" files. The .lng files are all 1 KB.
Please note that nothing has changed in the EU Editor!
I've then copied those files to my app's directory "\Common\Tesseract\*" - and the Languages combo got filled with languages... so that part is solved.
One question though: during the installation of the packs, additional files were also placed under "\Windows\System32\ocrdats" - those are a bunch of "name.lng" and "name_pxvocr.dat" files. It seems they are duplicates of those in Tesseract folder, having a different name, so that:
"\Program Files\Tracker Software\Comon\Tesseract\name.lng" == "\Windows\System32\ocrdats\name.lng"
"\Program Files\Tracker Software\Comon\Tesseract\name.dat" == "\Windows\System32\ocrdats\name_pxvocr.dat"
Q: For my application setup: should it also place files under "\Windows\System32\ocrdats\" - or are the files under "\Common\Tesseract" enough ?
-žarko
Ok, that worked - after downloading and installing a few language packs a new "Common\Tesseract" folder was created under "Tracker Software" under "\Program Files".
The "Tesseract" folder has a bunch of ".lng" and ".dat" files. The .lng files are all 1 KB.
Please note that nothing has changed in the EU Editor!
I've then copied those files to my app's directory "\Common\Tesseract\*" - and the Languages combo got filled with languages... so that part is solved.
One question though: during the installation of the packs, additional files were also placed under "\Windows\System32\ocrdats" - those are a bunch of "name.lng" and "name_pxvocr.dat" files. It seems they are duplicates of those in Tesseract folder, having a different name, so that:
"\Program Files\Tracker Software\Comon\Tesseract\name.lng" == "\Windows\System32\ocrdats\name.lng"
"\Program Files\Tracker Software\Comon\Tesseract\name.dat" == "\Windows\System32\ocrdats\name_pxvocr.dat"
Q: For my application setup: should it also place files under "\Windows\System32\ocrdats\" - or are the files under "\Common\Tesseract" enough ?
-žarko
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: OCR Plugin - Languages: none installed
Hi support,
Since "Add/Update Languages" is disabled in SDK by default, I'm trying to hide it from that dialog.
I've implemented IUIX_EventMonitor for "DlgOCRPages" but I cannot find (by try/fail) what event code to catch, as it seems it is not any of: "e.InitDialog", "e.Visible", "e.ShowModal".
What event to listen to ?
-žarko
Since "Add/Update Languages" is disabled in SDK by default, I'm trying to hide it from that dialog.
I've implemented IUIX_EventMonitor for "DlgOCRPages" but I cannot find (by try/fail) what event code to catch, as it seems it is not any of: "e.InitDialog", "e.Visible", "e.ShowModal".
What event to listen to ?
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: OCR Plugin - Languages: none installed
Hello žarko,
Forwarded your question about the language packs to Vasyl.
As for the dialog, can you make a screenshot of what you are trying to achieve?
Cheers,
Alex
Forwarded your question about the language packs to Vasyl.
As for the dialog, can you make a screenshot of what you are trying to achieve?
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: OCR Plugin - Languages: none installed
Hi Alex,
Hide this button:
-ž
Hide this button:
-ž
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: OCR Plugin - Languages: none installed SOLVED
Yes, yesterday, when I tried to reproduce your problem - also I noticed that that OCR-lang-installers add files into location that is obsolete for Editor and Tools applications. For the latest Editor/Tools the correct place should be:Please note that nothing has changed in the EU Editor!
c:\Program Files\Common Files\Tracker Software\Common\
but unfortunately we forget to update such installers according to the needs of latest Editor/Tools. We will fix it soon. I guess this problem was 'masked' by 'Add/Update Languages' feature that allow user to easily add new OCR-langs without using special installers. And I believe - most users prefer to use such simple feature.
We reproduced it. It is issue definitely. Thanks for report. It also will be fixed soon. And for sure, it is enough to fill just your "\Common\Tesseract" folder.during the installation of the packs, additional files were also placed under "\Windows\System32\ocrdats"
To hide this button you may use the following code:Since "Add/Update Languages" is disabled in SDK by default, I'm trying to hide it from that dialog.
Code: Select all
public void OnEventMonitor(PDFXEdit.IUIX_Obj pTarget, PDFXEdit.IUIX_Event pEvent)
{
if (pEvent.Code == (int)PDFXEdit.UIX_EventCodes.e_InitDialog)
{
if (pTarget.ID == pTarget.ThreadCtx.Inst.Str2ID("DlgOCRPages2"))
{
PDFXEdit.IUIX_Obj btn = pTarget.FindChild(pTarget.ThreadCtx.Inst.Str2ID("btn.addUpdateLangs"), 2);
if (btn != null)
{
btn.Show(0); // SW_HIDE==0
}
}
}
}
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: OCR Plugin - Languages: none installed
Hi Vasyl,
That does it, thanks.
-žarko
That does it, thanks.
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: OCR Plugin - Languages: none installed
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: OCR Plugin - Languages: none installed
Is there a way to enable the command so the button works in the SDK but then point the location of the button to a different url for custom installers of the language packs?
Also anyone else who comes across this post you probably want to also do the same thing in the "DlgAppPrefs.OCR" Preferences Dialog.
Also anyone else who comes across this post you probably want to also do the same thing in the "DlgAppPrefs.OCR" Preferences Dialog.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: OCR Plugin - Languages: none installed
Hello RMan,
First you will have to obtain the needed button (btn.addUpdateLangs):
Then you will have to implement a custom event target for the button's object and intercept the click:
viewtopic.php?f=66&t=29426&p=115630&hil ... et#p115630
Don't forget to dispose of it afterwards.
Cheers,
Alex
First you will have to obtain the needed button (btn.addUpdateLangs):
Code: Select all
PDFXEdit.IUIX_Button GetButton(PDFXEdit.IUIX_Dialog dlg, string sID)
{
IntPtr outPtr;
PDFXEdit.IUIX_Button ctl = null;
PDFXEdit.IUIX_Obj obj = dlg.GetItem(sID);
if (obj != null)
{
obj.QueryImpl(typeof(PDFXEdit.IUIX_Button).GUID, null, out outPtr);
ctl = (PDFXEdit.IUIX_Button)System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(outPtr);
}
return ctl;
}
viewtopic.php?f=66&t=29426&p=115630&hil ... et#p115630
Don't forget to dispose of it afterwards.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ