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 - Quad Points to Left/Top/Width/Height
  FAQ FAQ  Forum Search   Register Register  Login Login

Quad Points to Left/Top/Width/Height

 Post Reply Post Reply
Author
Message
jjohnston View Drop Down
Beginner
Beginner


Joined: 17 Dec 05
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote jjohnston Quote  Post ReplyReply Direct Link To This Post Topic: Quad Points to Left/Top/Width/Height
    Posted: 22 May 15 at 7:34AM
Is there a function to convert the quad points returned from GetPageText(4) to Left/Top/Width/Height values that can be used with the AddLinkToWeb function?

I need to be able to create these annotations programmatically over specific words in a document.
Also is there a way to change the background color of an annotation and set the opacity level?

Any help would be greatly appreciated.
Back to Top
erico View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24 Sep 14
Location: Minnesota USA
Status: Offline
Points: 51
Post Options Post Options   Thanks (0) Thanks(0)   Quote erico Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 15 at 3:24PM
Getting the Left/Top/Width/Height is simple math from the returned quad points. Just remember to use the appropriate pairs based upon your SetOrigin (e.g. for SetOrigin(0), Left/Top are X4, Y4; width is X3 - X4; height is Y4 - Y1)

From the documentation, it appears you can obtain color details via GetAnnotStrProperty (118 = color space) and GetAnnotDblProperty (119-126 are different color components) but curiously these values are not available to the corresponding SetAnnot...Property() functions.
Eric O
Back to Top
jjohnston View Drop Down
Beginner
Beginner


Joined: 17 Dec 05
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote jjohnston Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 15 at 4:03PM
Ok... great.  That's what I was doing but on some documents the positions are off.
I did not account for the Origin.  I discovered an old post of mine asking pretty much the same question years ago.  I'm still using the library the same way.  Was just hoping that there might be a better way to do this now.

Thanks for the reply.  I'll keep looking for a solution for setting the background color and opacity of the link annotation.  If anyone has any ideas, I'd love to hear them.



Edited by jjohnston - 26 May 15 at 6:06PM
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