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

More
IP: 145.239.133.204 6 years 5 months ago #14622 by zaraksis
hi guys, is there any way to copy and extract a mathematics text from a selectable document?
More
IP: 212.97.62.176 6 years 5 months ago - 6 years 5 months ago #14623 by nermeen
You can extract a page text using the following code: (check CommonUtil.getPageText())
Code:
String mPageText = null; Page mPage = mDocument.GetPage(pageIndex); mPage.ObjsStart(); mPageText = mPage.ObjsGetString(0, mPage.ObjsGetCharCount() - 1); mPage.Close();
[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:
Last edit: 6 years 5 months ago by support. Reason: improved answer
More
IP: 51.15.199.106 6 years 5 months ago #14624 by zaraksis
thanks, how i can get the current page index?
More
IP: 212.97.62.176 6 years 5 months ago #14629 by nermeen
You can use
Code:
ILayoutView.PDFGetCurrPage()
More
IP: 185.132.132.216 6 years 5 months ago #14630 by zaraksis
thanks nermeen, and how i can get total number of searched words?
More
Time to create page: 0.411 seconds
Powered by Kunena Forum