Hello, I'm just wondering how to do this:
I'm generating a PDF from a Java application. (And works great) the problem is that the PDF generated is generated on disk as:
Document documento = new Document(PageSize.A4, 25, 25, 25, 25);
PdfWriter writer = PdfWriter.getInstance(documento, new FileOutputStream("/Users/sheldon/Desktop/Registry.pdf"));
documento.open();
// Put some images on the PDF
for( byte[] imagen : imagenes )
{
Image hoja = Image.getInstance(imagen);
hoja.scaleToFit(documento.getPageSize().getHeight(), documento.getPageSize().getWidth());
documento.add(hoja);
}
documento.addTitle("Generated Registry!");
documento.close();
Now, as the user will search for the PDF and print them I don't need to store them on disk. I need (if possible) to generate them on memory and use a command to open (with acrobat reader) that document.
Is that possible? Any idea.
If not, what suggestions (on your experience) have.
Thank you on advance.
EDIT:
Is for an standard Java Desktop Application.