Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

FileWriter and PDF

 
Gaelle SMITS
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
I am running a web application that has to create a pdf file from its binary flow.
Here's what I have done :
File ftest = new File("temp.pdf");
FileWriter fw = new FileWriter(ftest);
fw.write(strTemp);
fw.close();
All this works perfectly... but when I call my PDF from a web browser, it doesn't start Acrobat Reader at all, but displays the binary flow.
How can I change this ?
Thanks,
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can generate a PDF file like that,u have use either FOP or iText.
FOP is from apache
itext - search google.
Regards
Balaji
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65545
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This actually has nothing to do with how the PDF is created, but rather how the browser is set up to handle various MIME types.
I recall seeing this very subject discussed in a previous thread (or perhaps threads).
"Use the search, Luke" and you should be able to locate the previous discussions.
hth,
bear
 
Destroy anything that stands in your way. Except this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!