Hi,
I'm trying to add a couple of web links to my pdf with PdfSharp. But only one link appears in the document.
Furthermore it appears at a completely different position.
Code:
XGraphics gfx = XGraphics.FromPdfPage(this._Page);
XFont font = new XFont("Verdana", 10);
XStringFormat format = new XStringFormat();
XTextFormatter tf = new XTextFormatter(gfx);
XRect Text = new XRect (20, this._Offset+100, 100, 100);
tf.Alignment = XParagraphAlignment.Left;
tf.DrawString("appointment", font, XBrushes.Black, Text, XStringFormats.TopLeft);
// I try to set the web link at the same position like the string "appointment"
XRect rec = new XRect (20, this._Offset+100, 20, 12);
PdfRectangle Pdfrec = new PdfRectangle (rec);
// google is just a test link
gfx.PdfPage.AddWebLink(Pdfrec, "http://www.google.de");
gfx.Dispose ();
Has somebody an idea to set more than one link in the document?
Thanks