Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - pop-up (onmouseover)
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

pop-up (onmouseover)

 Post Reply Post Reply Page  12>
Author
iText_User View Drop Down
New Member
New Member


Joined: 19 Sep 2012
Points: 9
Post Options Post Options   Quote iText_User Quote  Post ReplyReply Direct Link To This Post Topic: pop-up (onmouseover)
    Posted: 19 Sep 2012 at 8:57pm
Hi,

I would like to put additional information to my report. The information (a few lines of text) should pop-up (onmouseover), when the user moves the cursor over a defined region of a page and disappear, when the cursor leaves the region.

Is there more than one practicable way to achieve this and which approach would you recommend?

Thanks a lot!
Back to Top
Sponsored Links


Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 629
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 19 Sep 2012 at 11:30pm
The best way is to place a transparent button around that area, and then assign a tooltip to it.
The tooltip text will appear when the user hovers over the area with the mouse.
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
iText_User View Drop Down
New Member
New Member


Joined: 19 Sep 2012
Points: 9
Post Options Post Options   Quote iText_User Quote  Post ReplyReply Direct Link To This Post Posted: 20 Sep 2012 at 12:56am
Originally posted by try67 try67 wrote:

The best way is to place a transparent button around that area, and then assign a tooltip to it.
The tooltip text will appear when the user hovers over the area with the mouse.


Thanks again, try67! This approach works fine on pages with only a few hundred buttons. But there is a big performance problem when I have about 9000 buttons with tooltips on a single page...
Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 629
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 20 Sep 2012 at 9:03am
Yes, that could cause a problem... I don't see any way around it, though. You can't split the contents of that page to multiple pages? Or combine some of the buttons?
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
iText_User View Drop Down
New Member
New Member


Joined: 19 Sep 2012
Points: 9
Post Options Post Options   Quote iText_User Quote  Post ReplyReply Direct Link To This Post Posted: 20 Sep 2012 at 11:14am
Originally posted by try67 try67 wrote:

You can't split the contents of that page to multiple pages?


No, it's a quarterly overview of measured values. It looks a little like modern art ;)


Originally posted by try67 try67 wrote:

Or combine some of the buttons?


Every displayed colored rectangle should have his own information (timestamp, is holiday?, reference values, ...).


Originally posted by try67 try67 wrote:

I don't see any way around it, though.


In the case of html/javascript, I would use a <div></div>, set its content, position and visibility. Is there perhaps a analog approach in pdf/javascript with annotations, content layers or other elements? It should be also possible to arrange the rectangles in a table, if helpful ...
Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 629
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 20 Sep 2012 at 11:16am
I don't quite follow what you mean in the last question... It is possible to generate a set of annotations in a table-like structure, using a script.
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
aandi View Drop Down
Senior Member
Senior Member


Joined: 07 Jul 2011
Points: 18358
Post Options Post Options   Quote aandi Quote  Post ReplyReply Direct Link To This Post Posted: 20 Sep 2012 at 11:41am

But, of course, generated manually or automatically you still have the same performance hit. I don't think Adobe ever considered, or tested, the idea of thousands of form fields.

I can't think of a way to set up a generic solution, since I don't think you have the fine control to discover where the mouse is within a mouse over event (or do you?)
Back to Top
iText_User View Drop Down
New Member
New Member


Joined: 19 Sep 2012
Points: 9
Post Options Post Options   Quote iText_User Quote  Post ReplyReply Direct Link To This Post Posted: 20 Sep 2012 at 11:52am
Originally posted by try67 try67 wrote:

I don't quite follow what you mean in the last question... It is possible to generate a set of annotations in a table-like structure, using a script.


This posting indicates that there is possibly a solution with cell events:

http://article.gmane.org/gmane.comp.java.lib.itext.general/48075/match=table+tooltip


I think, I only need one annotation, when I can set its content, position and visibility when the cursor enters or leaves one of my rectangles? Is it possible to do this with javascript?
Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 629
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 20 Sep 2012 at 12:16pm
You can actually get the cursor's current position, but that won't help you because you can only use as a trigger going in to or out of a field, so you'll still have to create all of these fields... Also, you can't use a script to force a tooltip to show.
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
iText_User View Drop Down
New Member
New Member


Joined: 19 Sep 2012
Points: 9
Post Options Post Options   Quote iText_User Quote  Post ReplyReply Direct Link To This Post Posted: 20 Sep 2012 at 1:25pm
Originally posted by try67 try67 wrote:

so you'll still have to create all of these fields...


The pdf pages are generated from a database with java/iText. Here is a screenshot of the desired result:

http://img4web.com/view/EDP3AT

But the delay of the tooltip is not acceptable now!


Originally posted by try67 try67 wrote:

Also, you can't use a script to force a tooltip to show.


But I don't need a tooltip, if there is an other element, I can use? ;) Are there any elements like inputboxes, annotations or even complete layers, which I can manipulate with javascript (set_content(), set_visibility(), set_position()) so that they can replace tooltips?



Edited by iText_User - 20 Sep 2012 at 1:35pm
Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 629
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 20 Sep 2012 at 1:31pm
Yes, you can do it with a single text box that shows the text, but you'll still need to create the thousands of fields to trigger showing that text box and setting its text. I doubt that will be any faster than using a tooltip, and it would require a lot more scripting...

The bottom line is you're trying to use a PDF to do something it was never intended to do, and therefore are facing performance issues. You should consider using another format, or another way of displaying your data to the user.
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.031 seconds.