You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Prasad, Srinivasa" <sr...@lehman.com> on 2007/12/19 20:46:54 UTC

Printing a PDF file from JSP

Hi,
 
Is it possible to print a PDF file from a JSP.The pdf resides in my
application server.

Regards
Srinivasa Prasad

-----Original Message-----
From: Jake Robb [mailto:jrobb@sircon.com] 
Sent: Wednesday, December 19, 2007 2:30 PM
To: Struts Users Mailing List
Subject: RE: Struts 2 and SSL

Have a look at the implementation of the plugin's interceptor:

http://struts2-ssl-plugin.googlecode.com/svn/trunk/plugin/src/main/java/
com/googlecode/sslplugin/interceptors/SSLInterceptor.java

Just change it so that it looks at something else instead of the
annotation.

-Jake


-----Original Message-----
From: Maxx [mailto:maxxyme@gmail.com]
Sent: Wednesday, December 19, 2007 2:10 PM
To: Struts Users Mailing List
Subject: Re: Struts 2 and SSL

Hello,

Good idea, but when it's about "annotations", is it about Java 5?
How to handle/use this in Java (1.)4 ?

Thanks,
Maxx

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This message is intended only for the personal and confidential use of the designated recipient(s) named above.  If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited.  This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such.  All information is subject to change without notice.

--------
IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this communication (including any attachments) is not intended or written to be used and cannot be used for the purpose of (i) avoiding U.S. tax related penalties or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Printing a PDF file from JSP

Posted by Jeff Amiel <je...@gmail.com>.
On Dec 19, 2007 4:03 PM, Zoran Avtarovski <zo...@sparecreative.com> wrote:
> I don't know if you can print the file without displaying it first.

> I'm just trying to think how you could set it up to print only. Maybe Flash
> where you have greater control.

Not really......I went through this last month....there is simply NO
way to feed a PDF to a pure web (browser) application for direct
printing (without viewing).

The solution I ended up with was to pass it down (via the response)
with some javascript embedded in the PDF to auto-pop up the print
dialog and disable the menu/toolbars and auto-close after printing

There is a product out there called Advanced PDF Printer which can
utilize an active X control to 'remote' print a PDF...but it is
commercial......

Good Luck!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Printing a PDF file from JSP

Posted by Dave Newton <ne...@yahoo.com>.
Isn't FOP for creating PDFs from XML? I think the question was how to
download a PDF that already exists on the filesystem.

d.

--- mgainty@hotmail.com wrote:

> The technology is called FOP
> (Formatting Object Processor)
> http://xmlgraphics.apache.org/fop/
> I've used it quite extensively from the back end ..
> implementing from JSP would work as well (but there are security concerns
> on
> where to store the PDF file...)
> 
> Martin--
> ----- Original Message -----
> Wrom: YZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUW
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Wednesday, December 19, 2007 2:46 PM
> Subject: Printing a PDF file from JSP
> 
> 
> 
> Hi,
> 
> Is it possible to print a PDF file from a JSP.The pdf resides in my
> application server.
> 
> Regards
> Srinivasa Prasad
> 
> -----Original Message-----
> Wrom: LSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIP
> Sent: Wednesday, December 19, 2007 2:30 PM
> To: Struts Users Mailing List
> Subject: RE: Struts 2 and SSL
> 
> Have a look at the implementation of the plugin's interceptor:
> 
> http://struts2-ssl-plugin.googlecode.com/svn/trunk/plugin/src/main/java/
> com/googlecode/sslplugin/interceptors/SSLInterceptor.java
> 
> Just change it so that it looks at something else instead of the
> annotation.
> 
> -Jake
> 
> 
> -----Original Message-----
> Wrom: BARHDMNNSKVFVWRKJVZCMHVIBGDADRZ
> Sent: Wednesday, December 19, 2007 2:10 PM
> To: Struts Users Mailing List
> Subject: Re: Struts 2 and SSL
> 
> Hello,
> 
> Good idea, but when it's about "annotations", is it about Java 5?
> How to handle/use this in Java (1.)4 ?
> 
> Thanks,
> Maxx
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> 
> - - - - - -
> 
> This message is intended only for the personal and confidential use of the
> designated recipient(s) named above.  If you are not the intended recipient
> of this message you are hereby notified that any review, dissemination,
> distribution or copying of this message is strictly prohibited.  This
> communication is for information purposes only and should not be regarded
> as
> an offer to sell or as a solicitation of an offer to buy any financial
> product, an official confirmation of any transaction, or as an official
> statement of Lehman Brothers.  Email transmission cannot be guaranteed to
> be
> secure or error-free.  Therefore, we do not represent that this information
> is complete or accurate and it should not be relied upon as such.  All
> information is subject to change without notice.
> 
> --------
> IRS Circular 230 Disclosure:
> Please be advised that any discussion of U.S. tax matters contained within
> this communication (including any attachments) is not intended or written
> to
> be used and cannot be used for the purpose of (i) avoiding U.S. tax related
> penalties or (ii) promoting, marketing or recommending to another party any
> transaction or matter addressed herein.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Printing a PDF file from JSP

Posted by mg...@hotmail.com.
The technology is called FOP
(Formatting Object Processor)
http://xmlgraphics.apache.org/fop/
I've used it quite extensively from the back end ..
implementing from JSP would work as well (but there are security concerns on
where to store the PDF file...)

Martin--
----- Original Message -----
Wrom: YZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUW
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, December 19, 2007 2:46 PM
Subject: Printing a PDF file from JSP



Hi,

Is it possible to print a PDF file from a JSP.The pdf resides in my
application server.

Regards
Srinivasa Prasad

-----Original Message-----
Wrom: LSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIP
Sent: Wednesday, December 19, 2007 2:30 PM
To: Struts Users Mailing List
Subject: RE: Struts 2 and SSL

Have a look at the implementation of the plugin's interceptor:

http://struts2-ssl-plugin.googlecode.com/svn/trunk/plugin/src/main/java/
com/googlecode/sslplugin/interceptors/SSLInterceptor.java

Just change it so that it looks at something else instead of the
annotation.

-Jake


-----Original Message-----
Wrom: BARHDMNNSKVFVWRKJVZCMHVIBGDADRZ
Sent: Wednesday, December 19, 2007 2:10 PM
To: Struts Users Mailing List
Subject: Re: Struts 2 and SSL

Hello,

Good idea, but when it's about "annotations", is it about Java 5?
How to handle/use this in Java (1.)4 ?

Thanks,
Maxx

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - -

This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.

--------
IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within
this communication (including any attachments) is not intended or written to
be used and cannot be used for the purpose of (i) avoiding U.S. tax related
penalties or (ii) promoting, marketing or recommending to another party any
transaction or matter addressed herein.



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Printing a PDF file from JSP

Posted by Zoran Avtarovski <zo...@sparecreative.com>.
I don't know if you can print the file without displaying it first.

To display it, I'd just use the stream result in S2 and S1, just hijack the
request and stream the file to the user.

I'm just trying to think how you could set it up to print only. Maybe Flash
where you have greater control.

Z. 

> 
> Hi,
>  
> Is it possible to print a PDF file from a JSP.The pdf resides in my
> application server.
> 
> Regards
> Srinivasa Prasad
> 
> -----Original Message-----
> From: Jake Robb [mailto:jrobb@sircon.com]
> Sent: Wednesday, December 19, 2007 2:30 PM
> To: Struts Users Mailing List
> Subject: RE: Struts 2 and SSL
> 
> Have a look at the implementation of the plugin's interceptor:
> 
> http://struts2-ssl-plugin.googlecode.com/svn/trunk/plugin/src/main/java/
> com/googlecode/sslplugin/interceptors/SSLInterceptor.java
> 
> Just change it so that it looks at something else instead of the
> annotation.
> 
> -Jake
> 
> 
> -----Original Message-----
> From: Maxx [mailto:maxxyme@gmail.com]
> Sent: Wednesday, December 19, 2007 2:10 PM
> To: Struts Users Mailing List
> Subject: Re: Struts 2 and SSL
> 
> Hello,
> 
> Good idea, but when it's about "annotations", is it about Java 5?
> How to handle/use this in Java (1.)4 ?
> 
> Thanks,
> Maxx
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - -
> 
> This message is intended only for the personal and confidential use of the
> designated recipient(s) named above.  If you are not the intended recipient of
> this message you are hereby notified that any review, dissemination,
> distribution or copying of this message is strictly prohibited.  This
> communication is for information purposes only and should not be regarded as
> an offer to sell or as a solicitation of an offer to buy any financial
> product, an official confirmation of any transaction, or as an official
> statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
> secure or error-free.  Therefore, we do not represent that this information is
> complete or accurate and it should not be relied upon as such.  All
> information is subject to change without notice.
> 
> --------
> IRS Circular 230 Disclosure:
> Please be advised that any discussion of U.S. tax matters contained within
> this communication (including any attachments) is not intended or written to
> be used and cannot be used for the purpose of (i) avoiding U.S. tax related
> penalties or (ii) promoting, marketing or recommending to another party any
> transaction or matter addressed herein.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org