Return tiff file from outputstream on JSP
Posted
by YYY
on Stack Overflow
See other posts from Stack Overflow
or by YYY
Published on 2010-05-13T17:50:21Z
Indexed on
2010/05/13
17:54 UTC
Read the original article
Hit count: 276
I am using a JSP to display a single TIFF file. The flow is as follows:
- I am given a PDF to convert to a TIFF.
- I feed a 'black box' API the PDF in the form of a File object and an OutputStream (I am currently using a ByteArrayOutputStream but that can change as needed.
- The 'black box' converts the PDF to a TIFF and saves the result to the OutputStream.
- I use out.println(outputstream) to spit out the TIFF.
The problem is that I am getting a text stream instead of a displayed image. I have used the following head/meta tag:
<head><title>PDF to TIFF tester</title>
<META HTTP-EQUIV="Content-Script-Type" CONTENT="image/tiff"></head>
<body>
But that does not change the end result. Any help?
© Stack Overflow or respective owner