Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How to open /load pdf file in browser after it dynamically generated?

I used following code to store the generated pdf file in my server doc.save(new File(".").getAbsolutePath()+"/report.pdf") now i want open/load pdf file after it generated..

user-image
Question ajoutée par Gopalakrishnan P , Senior Software Engineer , Lakeba Group
Date de publication: 2013/09/24
Gopalakrishnan P
par Gopalakrishnan P , Senior Software Engineer , Lakeba Group

Atlast i solved with the following code

Ok.stream(Enumerator.outputStream { os =>        doc.writeToStream(os)      os.close()    }).withHeaders(      CONTENT_TYPE -> "application/pdf",      CONTENT_DISPOSITION -> "attachment; filename=report.pdf"    )

More Questions Like This