Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.

Extract text

More
IP: 192.168.0.71 8 years 11 months ago - 8 years 11 months ago #12217 by nermeen
Replied by nermeen on topic Extract text
We have tested your document with the below code, and we were able to extract the text on all pages.
So how you are calling your code? Can you send us a sample project that can be used to replicate the issue?
Code:
Global.Init(cordova.getActivity().getApplicationContext()); Document m_doc = new Document(); if(m_doc.Open("/mnt/sdcard/Download/LE_9_text_extract.pdf", "") == 0) { for (int i = 0; i < m_doc.GetPageCount(); i++) { Page page = m_doc.GetPage(i); page.ObjsStart(); String text = page.ObjsGetString(0, page.ObjsGetCharCount() - 1); Log.e("SJHY", "Text:" + text); page.Close(); } } m_doc.Close();
Last edit: 8 years 11 months ago by nermeen.
More
IP: 192.168.0.71 8 years 11 months ago #12219 by miguel.garcia
Replied by miguel.garcia on topic Extract text
Hi I have copied the same code but changin the document Path and ObjsGetCharCount always return 0.
This is my current code that has been added in RadaeePDFPlugin java class:

Global.Init(cordova.getActivity().getApplicationContext());
Document m_doc = new Document();
String path2OpenFile = "/mnt/sdcard/Android/data/com.efl.sjhy/files/LE_9_Analisis_NL_Seg_Vial/LE_9_Analisis_NL_Seg_Vial_1_20130205.pdf";
if(m_doc.Open(path2OpenFile, "") == 0) {
for (int i = 0; i < m_doc.GetPageCount(); i++) {
Page page = m_doc.GetPage(i);
page.ObjsStart();
String text = page.ObjsGetString(0, page.ObjsGetCharCount() - 1);
Log.e("SJHY", "Text:" + text);
page.Close();
}
}
m_doc.Close();
So, is there any problem with the path?

m_doc.OpenFile returns 0 which means the document has been right opened.

Thanks
More
IP: 192.168.0.71 8 years 11 months ago #12225 by nermeen
Replied by nermeen on topic Extract text
Does Global.Init return true? (i.e. are you activating the license correctly?)
As if the license is not activated, the text cannot be extracted.
More
IP: 192.168.0.71 8 years 11 months ago #12230 by miguel.garcia
Replied by miguel.garcia on topic Extract text
It returns false.
I am using the standard license that comes by default with the plugin.
Do i need to purchase another license for this feature?
Should i use our license (premium) for testing?
Thanks
More
IP: 192.168.0.71 8 years 11 months ago - 8 years 11 months ago #12231 by nermeen
Replied by nermeen on topic Extract text
If you already have a license you can use it, if you want to use the demo license, you can call RadaeePDFPlugin.activateLicense following this article and make sure that the package name/product id is com.radaee.reader
Last edit: 8 years 11 months ago by nermeen.
More
IP: 192.168.0.71 8 years 11 months ago #12232 by miguel.garcia
Replied by miguel.garcia on topic Extract text
Yes you were right i was trying to test our app with test account and as per the article the package name should be com.radaee.reader
After testing with this value i am able to get the whole pdf file text.
Thanks a lot
Time to create page: 0.383 seconds
Powered by Kunena Forum