Hi
My application uses Icefaces(1.6.1_21) at the front end.
All the pages are generated dynamically from xhtml templates.
I need to generate pdf and display in a new window to the user on click of a 'Export' button. Pdf should capture information on the current page.
I am wondering if the Java interface of Prince is capable of doing this. I know there is a convert(InputStream xmlInput, OutputStream pdfOutput) method. But I am not sure if am doing it right.
I am doing the following in my managed bean(The code might look dumb !! ).
FacesContext context = FacesContext.getCurrentInstance();
HttpServletResponse response =
(HttpServletResponse)context.getExternalContext().getResponse();
HttpServletRequest request =
(HttpServletRequest) context.getExternalContext().getRequest();
boolean converted = prince.convert(request.getInputStream(), response.response.getOutputStream());
I am new to Icefaces and Prince. Any help is greatly appreciated.
Thanks,
Smita
My application uses Icefaces(1.6.1_21) at the front end.
All the pages are generated dynamically from xhtml templates.
I need to generate pdf and display in a new window to the user on click of a 'Export' button. Pdf should capture information on the current page.
I am wondering if the Java interface of Prince is capable of doing this. I know there is a convert(InputStream xmlInput, OutputStream pdfOutput) method. But I am not sure if am doing it right.
I am doing the following in my managed bean(The code might look dumb !! ).
FacesContext context = FacesContext.getCurrentInstance();
HttpServletResponse response =
(HttpServletResponse)context.getExternalContext().getResponse();
HttpServletRequest request =
(HttpServletRequest) context.getExternalContext().getRequest();
boolean converted = prince.convert(request.getInputStream(), response.response.getOutputStream());
I am new to Icefaces and Prince. Any help is greatly appreciated.
Thanks,
Smita