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!
Quad Points to Left/Top/Width/Height |
Post Reply |
Author | |
jjohnston
Beginner Joined: 17 Dec 05 Status: Offline Points: 18 |
Post Options
Thanks(0)
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.
|
|
erico
Senior Member Joined: 24 Sep 14 Location: Minnesota USA Status: Offline Points: 51 |
Post Options
Thanks(0)
|
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
|
|
jjohnston
Beginner Joined: 17 Dec 05 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store