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.
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