Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

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 added by Gopalakrishnan P , Senior Software Engineer , Lakeba Group
Date Posted: 2013/09/24
Gopalakrishnan P
by 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

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.