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

Free Support Forum - aspose.com

Attaching files to existing pdf


I am currently using evaluation version of Aspose.Total (last version). Now I am trying to attach file to some pdf-file, which is located on my HD and than save it to different place, so that I do not disturb the source pdf.

Could you please give me short code example of how it could be done. I tried already a lot of possibilities and also with different types of attach-files but with no success. That why I can not describe which method exactly failed for me.

Thank you in advance.

Hello Horbachuk,

Thanks for considering Aspose.

You can attach any file to an existing pdf using Aspose.Pdf.Kit. For this purpose you can use CreateFileAttachment() method of PdfContentEditor class. For more information and sample code please visit CreateFileAttachment.

Hi Nayyer,

Thank you very much for your quick reply! That is exactly the thing.