names = this.pdfDoc.getFactory().makeNames();
this.pdfDoc.getRoot().setNames(names);
}
//Create embedded file
PDFEmbeddedFile file = new PDFEmbeddedFile();
this.pdfDoc.registerObject(file);
Source src = getUserAgent().resolveURI(embeddedFile.getSrc());
InputStream in = ImageUtil.getInputStream(src);
if (in == null) {
throw new FileNotFoundException(embeddedFile.getSrc());
}
try {
OutputStream out = file.getBufferOutputStream();
IOUtils.copyLarge(in, out);
} finally {
IOUtils.closeQuietly(in);
}
PDFDictionary dict = new PDFDictionary();