I successfully created PDF , but now I don't know how to make browser show
it like PDF (Acrobat is installed, when I open file directly in browser,
all is ok).
If I use this code:

File inputFile = new File(pdfFile);
FileReader fr = new FileReader(inputFile);
int c;
while( (c = in.read()) != -1)
out.write(c);
fr.close()

, it shows only

%PDF-1.3 %^??­ 4 0 obj << /Type /Info /Producer (null) >> endobj 5 0 obj
<< /Length 518 /Filter [ /ASCII85Decode /FlateDecode ] >> stream
GasIe]5GM?%,Cdrr.2-t77e1)A-gNlh$SBW3]IXolHoP1:b%cI[r>4J(X"OY7ipn7qX1?O^,[EMAIL 
PROTECTED]

lku6;kXe'1hU0KY_)ImgG*1CNnEe%YAdYqXKst:k4#- ...



When I placed on JSP page this line

response.setContentType("application/pdf");

, the result is similar:

%PDF-1.3
%^??­
4 0 obj
<< /Type /Info
/Producer (FOP 0.20.3) >>
endobj
5 0 obj
<< /Length 518 /Filter [ /ASCII85Decode /FlateDecode ]
 >>
stream
...

What must I do, to make browser use Acrobat plugin ? Thanks.

Reply via email to