Free Support Forum -

Not able to open few Attachments in PDF

hi Support,

I have created a PDF and attached documents to it. And few random documents are not opening. Can you please advise on this? Below is the code snippet, where reading a directory with file names.

public Document addDocAttachments(Document doc, String destDir,
List filenames) throws Exception {

FileSpecification filespecifications = null;

try {
for (String document : filenames) {
filespecifications = new FileSpecification(destDir
+ File.separator + document, document);

/* Adding attachments to PDF happens here */
//“File Attachments embedded to PDF”);
} catch (Exception e) {
throw new Exception(
"Error occured while attaching documents to email PDF template. ",
return doc;


Attaching the output document.

Thanking You

Hi Rajesh,

Thanks for your inquiry. I have tested the scenario and noticed the attachments accessibility issue. So I have logged a ticket PDFNEWJAVA-34843 in our issue tracking system for further investigation and resolution. We will notify you as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,

hi Tilal.

Please let us know the ETA on this.


Hi Rajesh,

As we recently have been able to notice this issue, and until or
unless we have investigated and have figured out the actual reasons of this
problem, we might not be able to share any timelines by which this problem will
be resolved.<o:p></o:p>

However, as soon as we have made some significant progress towards the resolution of this issue, we would be more than happy to update you with the status of correction. Please be patient and spare us little time. Your patience and comprehension is greatly appreciated in this regard.

The issues you have found earlier (filed as PDFNEWJAVA-34843) have been fixed in Aspose.Pdf for Java 10.4.0.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.