HiQPdf Documentation

PDF File Links

HiQPdf Client for .NET Core
PDF File Links Demo

This demo creates a link to an external file from disk. The file path is relative to the PDF document location. When the link is clicked the file will be opened in an external viewer.

Demo Source Code

// create the external file link
string extFilePath = @"DemoFiles\Attach\TextAttach1.txt";
string linkText = String.Format("Click this link to open the '{0}' file from file system", extFilePath);
PdfText clickHereText = new PdfText(10, 100, linkText, pdfFontEmbed);
clickHereText.ForeColor = PdfColor.Navy;

document.CreateFileLink(page1, new RectangleFloat(10, 100, 350, pdfFontEmbed.Size), extFilePath);
See Also

Other Resources