Free Support Forum -

Attachments in PDF

I used the following code for attaching multiple files to PDF. But all the attachments had the same body. Please help me to get the actual body for each attachment.

//open document

Document pdfDocument = new Document("ABCD.pdf");

//setup new file to be added as attachment

FileSpecification fileSpecification = new FileSpecification("test.txt", "Sample text file");

//add attachment to document's attachment collection


//save new output


Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

We are not clear about your issue. Please share more details regarding your issue. Also, please share with us the template PDF file, attachment files you are using and your generated PDF file. Also, please explain the result you want to achieve.

Thank You & Best Regards,