We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Link in wrong position but text in correct position when adding PdfTextWebLink to existing PDF

I am attempting to add a new text link to a web address in an existing PDF using PdfTextWebLink. I have tested and am able to create a new PDF with a PdfTextWebLink following the Syncfusion code sample here. Using either of the signatures for PdfTextWebLink.DrawTextWebLink() works when creating a new PDF. When working with a page in an existing PDF and following the Syncfusion code sample here (see attachment for the result of running this code), however, the text is drawn to the PDF but it is not a link. This is specifically using the overload where the first parameter is PdfGraphics.

Is this a bug in the source? Why is it not being added as a link when editing a PDF?

Thanks in advance.

Attachment: Output_b91b141d.zip

3 Replies

GR Gayathri Ramalingam Syncfusion Team March 31, 2017 01:51 PM UTC

Hi Scott, 
Thank you for using Syncfusion product. 
We are not able to reproduce the reported issue, we have created a sample which we have tried. Can you please modify the below sample to reproduce the issue, It will be helpful for us to investigate more on this.  
Please find the sample from the below link, 
Note: The specified URL can be navigated from the text by clicking on the text which navigates to the given URL link.  
Please let us know if you need further assistance on this. 
With Regards, 
Gayathri R 

SH Scott Hoelsema March 31, 2017 03:40 PM UTC

Thanks for your reply. I have determined that the link is in the document, but somehow it is at the wrong y coordinate position. The text is in the right position but the link is not. See the attached PDF for an example The link is added in the proper x coordinate but the y coordinate is measured from the bottom edge of the page rather than the top edge. So seemingly the text is added using GDI coordinates but the link is added using PDF coordinates.

What would make this incorrectly placed y coordinate happen? How can I resolve it?

Attachment: Output_825c8e21.zip

GR Gayathri Ramalingam Syncfusion Team April 3, 2017 09:44 AM UTC

Hi Scott, 
A support incident to track the status of reported issue has been created under your account. Please log on to our support website to check for further updates.    
With Regards, 
Gayathri R 

Live Chat Icon For mobile
Up arrow icon