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

TOPIC:

Create a selection from startIndex, endIndex 6 years 10 months ago #12432

  • doubleeye
  • doubleeye's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 21
  • Thank you received: 0
Currently we create a new selection using top,left, bottom, right coordinates.

Is there a way I can use the character startIndex and character endIndex to create a selection?

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

Create a selection from startIndex, endIndex 6 years 10 months ago #12436

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
If you have the start and end index in PDF coordinates, you can create selection as the following:
VSel m_sel = new VSel(m_doc.GetPage(pageno));
m_sel.SetSel( start.x, start.y, end.x, end.y);
.....
You can take as example the selection behavior in the demo project, check PDFLayoutView.onTouchSelect, PDFLayoutView.onDrawSelect

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

  • Page:
  • 1
Powered by Kunena Forum