Hyperlink with descriptive text to internal file attachment

How can I add an attachment to a PDF and also provide a hyperlink with the name of the attachement within the PDF. The file annotation is only a pushpin icon. We need to use a hyperlink instead.

//this just adds the file to the PDF but how can I then link to it within a hyperlink annotation?
FileSpec fs = FileSpec.Create(doc, sPDFFile, true);
fs.SetDesc(Path.GetFileName(sPDFFile));
doc.AddFileAttachment(Path.GetFileName(sPDFFile), fs);

//This just add an icon, no link with the filename is shown
pdftron.PDF.Annots.FileAttachment file_attach = pdftron.PDF.Annots.FileAttachment.Create(doc, new Rect(x1, y1, x1-10, y1-10), sfnamepath);
file_attach.RefreshAppearance();
cur_page.AnnotPushBack(file_attach);

Thanks

Hi,

Our Annotation sample goes over all the different types of links that can be created:

The second example you provided simply embeds the file within the PDF, it does not create a link.

Why is linking other internal files important for you or your clients?
Which product are you currently using? Core SDK, Webviewer, iOS/Android, etc?

Using the Core SDK in C#. We are taking .msg emails with attachments and printing to PDF. If you have ever printed an email to PDF you see the attachments are added to the PDF and clickable hyperlinks inline within the PDF open the attachment. Looking to replicate this behavior?