• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Corrupt PDF file while using .fo to .PDF using FOP

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am trying to generate sample pdf file from .fo file.
(I am Using fop-0.94)
I can generate it correctly using commandline application.
(i.e. the utility class of FOP org.apache.fop.cli.Main).

Now I want to put this functionality in web app.
This is the code I wrote.



This does creates pdf file without errors.But when i try to open this file I get following error.

==== Error message start====
There was a error opening this document.The file is damaged and could not be repaired.
==== Error message end ====

Does any one has any clue ?

Regards
Ajit Kanada
[ September 06, 2007: Message edited by: Ajit Kanada ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're missing an "out.close()" at the end of your code.
 
Aji Ozkan
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankx Ulf for pointing out.
It works correctly now.

Regards
Ajit Kanada
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic