Print Page | Close Window

Text selection with mouse

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2729
Printed Date: 31 May 25 at 10:08AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Text selection with mouse
Posted By: ginidat
Subject: Text selection with mouse
Date Posted: 10 Sep 13 at 12:55PM
hello!

I've looked through the whole forum - maybe I've missed it, but:

how can I display a PDF and the user is able to select text with pressed mouse button
like allmost any reader (acrobat, pdf exchange viewer, ...) can?

I stuck to find the right function of the lib.
renderPage delivers only a bitmap with rendered text without any information where the text is located; ExtractPageTextBlocks delivers only the text without any "visual" context.

Do you have any hint?
That would be really great!
Thank you!



Replies:
Posted By: Ingo
Date Posted: 11 Sep 13 at 8:35AM
Hi Gini!
 
You can get textcontent from a determined section of a page by doing the exraction with position data and then selecting the pixel-coordinates you want.
The combination with mouse-activities isn't a built-in-functionality.
The comparison with acrobat and co isn't fair - on one side there's an acrobat-installation with more then 100 mb and on the other side there's the small quickpdf-lib ;-)
The solution should be anywhere by drawing onto canvas and then dealing with mousemove... mouseclick...
 
Cheers, Ingo
 


-------------
Cheers,
Ingo



Posted By: AndrewC
Date Posted: 11 Sep 13 at 8:51AM
ginidat,

Debenu Quick PDF Library doesn't not have any functions designed to interact with the GUI / Mouse.

It is possible to create such an editor with QPL but it does take a little bit of work.

Andrew.


Posted By: ginidat
Date Posted: 11 Sep 13 at 12:35PM
Hello and Thank you for your replies!

My mistake: I did not really believe that there is a build in function!
And: I don't want to compare with full featured pdf reader/viewer!

I ambition was to get a hint for a "how to".

Your approach, Ingo is the thing!
Thank you very much!

Cheers, Gini


Posted By: AndrewC
Date Posted: 12 Sep 13 at 10:40AM
ginidat,

The two functions you have mentioned would provide the basics.  What language are you using ?

Here are some links to give you some low levels hints on how to do what you need.

http://stackoverflow.com/questions/16851654/draggable-selection-rectangle" rel="nofollow - http://stackoverflow.com/questions/16851654/draggable-selection-rectangle

You should find something relevant here in these search results.

http://stackoverflow.com/search?q=rectangle+mouse+draw" rel="nofollow - http://stackoverflow.com/search?q=rectangle+mouse+draw

Andrew.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk