Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
converting byte array to pdf
Joined: Jun 22, 2004
Oct 26, 2006 06:23:00
I have a byte array of a
file. I want to show the pdf in web browser using this byte array.Is there any way to do it.
Any suggestions are welcome.
Thanks and Regards,<br />Manish Agarwal<br />SCJP 1.4 (100%)<br />SCWCD 1.4 (98%)<br />SCBCD 1.3 (Preparing)
Joined: Jun 19, 2001
Oct 26, 2006 06:45:00
set the content type ("application/pdf") and content length headers and then just send the bytes.
Joined: Apr 14, 2004
Oct 26, 2006 06:46:00
More of a
question. I'm moving this to that forum.
Author and all-around good cowpoke
Joined: Mar 22, 2000
Oct 26, 2006 07:24:00
Note that because a PDF should be considered binary data, you must send the bytes to an output stream from getOutputStream(), not a writer from getWriter().
It is sorta covered in the
JavaRanch Style Guide
subject: converting byte array to pdf
PDF display in JSP
problem reading pdf with iText Library
help in converting pdf into byte array
copying file into database
Display PDF in IE from byte array using Servlet
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013