• Post Reply Bookmark Topic Watch Topic
  • New Topic

Response Output as PDF  RSS feed

 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to write the response output as PDF. I tried with the following code.


There was no error (or) Exception in Tomcat server. But the FireFox browser is saying

File does bor begin with '%PDF--';
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To send the response as a pdf, you would first need to generate a PDF.
Try a Google search for "Apache FOP" or "itext" to find some libraries for generating PDFs.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Itext is memmory centric. If memmory is a constraint FOP is a beeter choice.
iText is easy to configure and use. For bigger applications FOP is prefered.

Another tool is FDF toolkit. Which also have limitations.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!