Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem saving a PDF document

 
Alessandro Gatta
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm developing an application using JSF and Jboss Portal 2.7.2. I need to visualize and save a pdf document in the portal. The code to generate the pdf preview is:
...
...

...
...

When I try to save the pdf, the name assigned to it by Adobe plugin is "JSFPortletWindow.pdf". I'd like to customize the name of the pdf but the setHeader doesn't work. I'd like to know if it's possible to modify at runtime the name of JSFPortletWindow that is in the WEB-INF\default-object.xml.
This is my xml

Please help me.
Thanks
 
Maneesh Godbole
Saloon Keeper
Posts: 11331
16
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alessandro,
Welcome to the Ranch.

In future, while posting code, please UseCodeTags as it makes the content easier to understand.
http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
 
Neeraj Shidhaye
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Well, i also had requirement for generating PDF from portlet and which should allow user to open,save the pdf dodument.

I introduced servlet and my servlet was generating pdf.

I would suggest, if you could move your pdf generation code to Servlet that should solve your problem.
I mean, on click of your generate pdf button, control should go to servlet.

hope that helps.

<Neeraj Sidhaye/>
http://ExtremePortal.blogspot.com

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic