0

In java, something like PDFView.getSelection(currPage) is possible, but in PDFNet it's not possible to call the GetSelection() method with a parameter, it returns the text on the first page only.

How can i get a selection on a specific page in PDFNet?

DennisVA
  • 2,068
  • 1
  • 25
  • 35

1 Answers1

0

There is PDFViewCtrl.GetSelection(page_num) that will return any selection on the specified page.

If there is no actual selection on that page, then PDFViewCtrl.Selection.GetQuads will return an empty array.

Ryan
  • 2,473
  • 1
  • 11
  • 14
  • Nope it doesn't have that when i using winforms, i might have an older version, going to check it asap – DennisVA Jul 05 '16 at 16:42
  • That function has been available since 2010, for our PDFViewCtrl class for PDFNet .Net. Can you let me know the PDFNet Dll filename, and the version number from the Windows Explorer file properties (or call PDFNet.GetVersion at runtime) that you are using. – Ryan Jul 05 '16 at 20:48
  • filename: PDFNet.dll, version at runtime: 5,1 – DennisVA Jul 06 '16 at 06:37
  • I see. 5.1 was released September 2010, so apparently you need to update to the latest version. Please contact support at pdftron using your company email address. https://www.pdftron.com/pdfnet/whatsnew.html – Ryan Jul 06 '16 at 16:30
  • Thank you for your help ;) . – DennisVA Jul 06 '16 at 16:49
  • would you maybe know an answer to this one too? http://stackoverflow.com/questions/38240575/saving-the-color-of-an-annotation-in-pdftron-pdfnet-winforms – DennisVA Jul 07 '16 at 10:56