Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

extract math texts and equations from pdf 4 years 6 months ago #14622

  • zaraksis
  • zaraksis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
hi guys, is there any way to copy and extract a mathematics text from a selectable document?

Please Log in or Create an account to join the conversation.

extract math texts and equations from pdf 4 years 6 months ago #14623

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
You can extract a page text using the following code: (check CommonUtil.getPageText())
String mPageText = null;        
Page mPage = mDocument.GetPage(pageIndex);
mPage.ObjsStart();
mPageText = mPage.ObjsGetString(0, mPage.ObjsGetCharCount() - 1);
mPage.Close();
But there is no API to detect whether the text is a mathematical equation or not.

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:

Please Log in or Create an account to join the conversation.

Last edit: by support. Reason: improved answer

extract math texts and equations from pdf 4 years 6 months ago #14624

  • zaraksis
  • zaraksis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
thanks, how i can get the current page index?

Please Log in or Create an account to join the conversation.

extract math texts and equations from pdf 4 years 6 months ago #14629

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
You can use
ILayoutView.PDFGetCurrPage()

Please Log in or Create an account to join the conversation.

extract math texts and equations from pdf 4 years 6 months ago #14630

  • zaraksis
  • zaraksis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
thanks nermeen, and how i can get total number of searched words?

Please Log in or Create an account to join the conversation.

extract math texts and equations from pdf 4 years 6 months ago #14631

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum