When using the latest hotfix for Spire.Pdf (commercial version), the insert hyperlink functionality is broken. The text for the hyperlink is viewable on the page but there will be no hyperlink associated with it. Therefore, the link will appear on a page but it will not be clickable. It worked in prior versions.
Bug introduced in version:
Spire.Pdf 3.6.321.4040
Last worked in version:
Spire.Pdf 3.6.131.4040
Sample code:
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(@"files\Upgrade.pdf");
string hyperlinkText = "HLText";
string hyperlinkURL = "www.microsoft.com";
string hyperlinkFont = "Veranda";
float hyperlinkFontSize = 12f;
float x = 100;
float y = 100;
// Draw the image...
PdfPageBase page = doc.Pages[0];
PdfBrush brush = PdfBrushes.DarkBlue;
PdfTrueTypeFont font = new PdfTrueTypeFont(new Font(hyperlinkFont, hyperlinkFontSize, System.Drawing.FontStyle.Underline));
PdfTextWebLink link = new PdfTextWebLink();
link.Text = hyperlinkText;
link.Url = hyperlinkURL;
link.Font = font;
link.Brush = brush;
link.DrawTextWebLink(page.Canvas, new PointF(x, y));
// Use Spire.Pdf to do the conversion...
doc.SaveToFile("broken_hyperlink_test.pdf");