We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Text hyperlink to EmbeddedFile


Is it possible to have a text hyperlink to embedded file.

I have a pdf file with some embedded files and i would to create in text some hyperlinks to this embedded file to open it.

Thanks for your help.



Thanks for your inquiry.

We already have logged a feature request as PDFNET-40886 in our issue tracking system. We have linked your post with the ticket ID as well, so that you will receive notification once the feature is available. Furthermore, you may please use FileAttachmentAnnotation in order to provide a link to embedded file(s) inside PDF, while using following code snippet:

var pdfDocument = new Document(dataDir + "FileWithAttachment.pdf");
Page pdfPage = pdfDocument.Pages[1];
Aspose.Pdf.Annotations.FileAttachmentAnnotation fileAttachment = new Aspose.Pdf.Annotations.FileAttachmentAnnotation(pdfPage, new Aspose.Pdf.Rectangle(0, 0, 16, 16), pdfDocument.EmbeddedFiles[1]);
fileAttachment.Rect = new Aspose.Pdf.Rectangle(100, 100, 120, 120);
fileAttachment.Icon = Aspose.Pdf.Annotations.FileIcon.Paperclip;
fileAttachment.Title = "Attached file";
fileAttachment.Contents = "Attached file";
pdfDocument.Save(dataDir + "LinktoFileWithAttachment.pdf");

Concerning to the logged feature request, we will surely let you know once we make any significant progress towards its availability. Please spare us little time.

We are sorry for the inconvenience.

Is this feature available ?


Regretfully, the feature could not get implemented due to other feature and enhancements requests which were logged prior to it. We will surely update this forum thread as soon as we have some news about its availability. Please give us some time.

We are sorry for the inconvenience.

Hi Asad,

Thanks for responding.

As this feature is not available, Is it possible for us to set the location of another hyperlink as Goto action and get it auto clicked by code.

My logic is, we will create one FileAttachmentAnnotation and we will set a reference of this in rest of the annotations/ hyperlinks.



image003.jpg (181 Bytes)


We believe that you have posted your similar inquiry in a separate thread as well. We are responding you there.