IOUtils.closeQuietly(in);
}
PDFDictionary dict = new PDFDictionary();
dict.put("F", file);
String filename = PDFText.toPDFString(embeddedFile.getFilename(), '_');
PDFFileSpec fileSpec = new PDFFileSpec(filename);
fileSpec.setEmbeddedFile(dict);
if (embeddedFile.getDesc() != null) {
fileSpec.setDescription(embeddedFile.getDesc());
}
this.pdfDoc.registerObject(fileSpec);
//Make sure there is an EmbeddedFiles in the Names dictionary
PDFEmbeddedFiles embeddedFiles = names.getEmbeddedFiles();