Hi there,

I would like to know wether it's possible to send a Pdf as InputStream.

This is what I'm doing now:
- Create a Pdf with a form
- Add a button
- Add an action: PdfAction ac = PdfAction.createSubmitForm(url, null, 0);
- if the user clicks the button the Pdf should be in the requests InputStream.

This is how I read the InputStream:

        File tempFile = File.createTempFile("ps-", ".pdf");
      FileOutputStream fout = new FileOutputStream(tempFile);
      BufferedInputStream bin = new BufferedInputStream(req.getInputStream());
      BufferedOutputStream bout = new BufferedOutputStream(fout);
      byte[] buf = new byte[8 * 1024];
      int len;
      while ((len = bin.read(buf)) > -1) {
        bout.write(buf, 0, len);
      }

But all I got is a FDF-file :/
This is the content of the temporary file I got:
%FDF-1.2
%âãÏÓ
1 0 
obj<</FDF<</Fields[<</T(notes)>><</T(order)/V(654123_123654)>><</T(user)/V(654123)>><</T(Übernehmen)>>]/ID[<><>]/F(/C/DOKUME~1/bn/LOKALE~1/Temp/preview-7.pdf)>>>>
endobj
trailer
<</Root 1 0 R>>
%%EOF

Is there any way to send the whole pdf-file along? I guess the Action I created 
is wrong.
Thanks in advance :)

Beate Niendorf


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to