Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Outline?  Annotation?  JavaScript?
  FAQ FAQ  Forum Search   Register Register  Login Login

Outline? Annotation? JavaScript?

 Post Reply Post Reply
Author
Message
cscooper View Drop Down
Beginner
Beginner
Avatar

Joined: 06 Apr 12
Location: Boulder, CO
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote cscooper Quote  Post ReplyReply Direct Link To This Post Topic: Outline? Annotation? JavaScript?
    Posted: 11 Apr 12 at 10:41PM
I have an idea what I want the final product to look like, but I'm looking for suggestions what the underlying technology needs to be ...

I want my PDF document to have rectangular "hotspots" that as the user rolls their mouse over these spots, the hotspot becomes visible - maybe yellow highlight or something (and maybe it was a little bit visible to start with in a non-intrusive way) and a box pops up near the hotspot telling you about the hot-spotted area.  When the mouse moves on, the highlighting and the box go away.

In addition, I want an outline that contains a list of all of these hotspots - and when the user clicks on an item in the outline, it takes you to the correct page, and activates the hotspot as if the user had moved their mouse over it.

Ideas/suggestions on the best way to implement this (using the QuickPDF library of course)?

Thanks,
Chris

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 12 at 7:40AM
Hi Chris!

You can deal with the AddLinkTo-functionalities (but with
an empty linkstring... don't know if this is possible).

You should additionally have a look on:
AddNoteAnnotation and
SetAnnotQuadPoints.

Cheers, Ingo


Back to Top
cscooper View Drop Down
Beginner
Beginner
Avatar

Joined: 06 Apr 12
Location: Boulder, CO
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote cscooper Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 12 at 3:24PM
Thanks for the advice!

I tried a few things.  I called AddNoteAnnotation twice (once a Comment, once a Note) and AddTextMarkupAnnotation once (Highlight).  When I load the PDF in Reader, I have various things floating around the page, but none of them are quite what I was looking for.

Both of the "Note" annotations result in two items: (1) an icon on the page (either a yellow thought bubble for the Comment or a blue rectangle for the Note) and (2) a box that kind of floats around that contains some editable text.  Neither of the icons are transparent, so the user can't see the text beneath the icon, and that's a requirement.

The "Text Markup" annotation looks possible, it's just a highlighted rectangle and the underlying text is clearly visible, and when I double-click on it, it pops up a new comment box.  That's closer, now I need to tweak the UI a little.

How can I ...
(1) create a comment box linked to my Text Markup annotation?
(2) make it so the linked comment box is initially hidden, but as I mouse over the Text Markup annotation, the linked comment box becomes visible?
(3) make it so the linked comment box is read-only?

Thanks,
Chris

Back to Top
cscooper View Drop Down
Beginner
Beginner
Avatar

Joined: 06 Apr 12
Location: Boulder, CO
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote cscooper Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 12 at 4:03PM
I just made some very good progress ... by creating a "Text Markup" annotation and calling "SetAnnotContents" on it, when I open the resulting PDF in Adobe Reader, I get a popup that appears when I mouse-over the highlighted area, containing my text!  (and the popup goes away if I move the mouse away from the highlighted area which is perfect for my needs)

But I'd like to tweak it a little ... right now what I get for a popup is a yellowish box with a horizontal line in the middle; the box is empty above the line, and has my text below.  If I double-click on the popup (in Adobe Reader) and change the Highlight Properties in the resulting Comment box by adding an Author and a Subject, I see that it's the Author information that appears above the horizontal line in the original popup.  However, I don't see any way to set the Author information in QuickPDF; I don't even see any way to query the Author information (notice this is the author of the comment, not the author of the document).  I'd also like to set the "Locked" property in the Highlight Properties box; even though the user can easily just un-check this property and make any modifications they want, at least that would prevent accidental changes.

And then a more advanced question ... can I modify the color of the "Text Markup" annotation on-the-fly (maybe with JavaScript)?  What I'm hoping to do, is that when the user clicks on a specific item in the outline, to have it not only go to the right page with the right Text Markup Annotation in the middle of the view, but in case there are a few Text Markup Annotations on the screen, have the correct one indicated (by having it be a different color, or flash or something).  Is this possible?

Thanks,
Chris

Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 13 Apr 12 at 12:03PM
This Javascript manual might be helpful as most Javascript is outside the scope of Quick PDF Library.

http://partners.adobe.com/public/developer/en/acrobat/sdk/AcroJSGuide.pdf
Back to Top
cscooper View Drop Down
Beginner
Beginner
Avatar

Joined: 06 Apr 12
Location: Boulder, CO
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote cscooper Quote  Post ReplyReply Direct Link To This Post Posted: 13 Apr 12 at 2:02PM
OK, time to dive into JavaScript!

Thanks,
Chris



Edited by cscooper - 13 Apr 12 at 5:15PM
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store