- Posts: 7
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
extract math texts and equations from pdf
IP: 145.239.133.204
6 years 5 months ago #14622
by zaraksis
extract math texts and equations from pdf was created by zaraksis
hi guys, is there any way to copy and extract a mathematics text from a selectable document?
IP: 212.97.62.176
6 years 5 months ago - 6 years 5 months ago #14623
by nermeen
Replied by nermeen on topic extract math texts and equations from pdf
You can extract a page text using the following code: (check CommonUtil.getPageText())
[strike]But there is no API to detect whether the text is a mathematical equation or not.[/strike]
PDF doesn't specify a way to encode or represent maths inside documents so there's no way to detect maths formulas and even less to copy properly formatted text in a reliable way.
I suggest you look at the video at below link:
Code:
String mPageText = null;
Page mPage = mDocument.GetPage(pageIndex);
mPage.ObjsStart();
mPageText = mPage.ObjsGetString(0, mPage.ObjsGetCharCount() - 1);
mPage.Close();
PDF doesn't specify a way to encode or represent maths inside documents so there's no way to detect maths formulas and even less to copy properly formatted text in a reliable way.
I suggest you look at the video at below link:
Last edit: 6 years 5 months ago by support. Reason: improved answer
IP: 51.15.199.106
6 years 5 months ago #14624
by zaraksis
Replied by zaraksis on topic extract math texts and equations from pdf
thanks, how i can get the current page index?
IP: 212.97.62.176
6 years 5 months ago #14629
by nermeen
Replied by nermeen on topic extract math texts and equations from pdf
You can use
Code:
ILayoutView.PDFGetCurrPage()
IP: 185.132.132.216
6 years 5 months ago #14630
by zaraksis
Replied by zaraksis on topic extract math texts and equations from pdf
thanks nermeen, and how i can get total number of searched words?
IP: 212.97.62.176
6 years 5 months ago #14631
by nermeen
Replied by nermeen on topic extract math texts and equations from pdf
You can check
Search in whole pdf file
Time to create page: 0.411 seconds