In the footer I add an email link with page.AddWebLink(LINK).
LINK is something like "mailto:xxx@yyy.zz".
Clicking on this link, my Outlook opens perfectly. Everthing is perfect.
I'm using pdfsharp.dll version 1.51.5185.0.
Now I observe, that at the top of my pages, in a XRect the mouse cursor turns to the pointer as well as in the link at the end of the page.
The size of the XRect at the top has the same size as the XRect at the bottom.
However, on the top no text is visible.
It seems, that pdfsharp inserts my link twice: once at the bottom, once at the top.
I checked my XRect, no error found. No double call of page.AddWebLink(LINK) in my code.
The same problem was observed when I use page.AddFileLink(...);
Here the code as example:
Code:
for (int p = 0; p < doc.Pages.Count; p++)
{
px = GetPositionLeft;
py = GetPositionTop;
email = "xxxx@yyyy.zz";
using (XGraphics gfx = XGraphics.FromPdfPage(doc.Pages[p]))
{
[...]
txt = email;
width = gfx.MeasureString(txt, FontFooter).Width;
txt = "mailto:" + email;
XRect rect = new XRect(px, py, width, FontFooter.GetHeight());
PdfRectangle rectLink = new PdfRectangle(rect);
doc.Pages[p].AddFileLink(rectLink, txt );
txt = email;
gfx.DrawString(txt, FontLink, XBrushes.Blue, px, py, XStringFormats.TopLeft);
[...]
}
}
Any help is appreciated. Kind regards.