PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Apr 18, 2024 2:26 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Nov 21, 2016 5:50 pm 
Offline

Joined: Mon Nov 21, 2016 5:48 pm
Posts: 2
Hi, I'm trying to add a link to an email address when creating the PDF but the link doesn't seem to take. What am I doing wrong:

var h = p.AddHyperlink(_field["Email"], HyperlinkType.Url);
h.AddFormattedText(_field["Email"]);

_field["Email"] contains the proper email address and it displays and highlights the text as expected, but it doesn't go anywhere.

Thank you


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 21, 2016 8:18 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 913
Location: CCAA
Hi!

Have you tried pre-fixing the e-mail address with "mailto:" in the call to AddHyperlink?

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 21, 2016 9:05 pm 
Offline

Joined: Mon Nov 21, 2016 5:48 pm
Posts: 2
That worked. Can't believe I didn't try that out first.

Now to try and figure out why Adobe likes to surround the hyperlink in a box.


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 21, 2016 10:14 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 913
Location: CCAA
rpuscasu wrote:
Now to try and figure out why Adobe likes to surround the hyperlink in a box.
There was a bug in earlier versions of PDFsharp.

You should use PDFsharp 1.50 beta 3b.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 56 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group