You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rafael Taboada <ka...@gmail.com> on 2005/08/04 03:36:50 UTC

Showing a PDF inside a JSP

Hi Folks, I know my doubt is out Struts topic but I want to use ur 
xperiencie in my problem.

I want to show a report in PDF file inside a JSP, inside a table for 
example. I'm surfing on the web and all sites when try to show PDF they link 
to this file and the PDF is showed in the entire window if the user has 
acrobat in his PC.
 Is it possible to show the PDF but embed in JSP or HTML?? I mean, I have to 
show a form in order to generate the PDF, and when th user click on GENERATE 
REPORT button, it makes a PDF file and I want to show this PDF in the same 
page...
 Do u know any place where I can find information for my doubt?.
 Any help would be appreciated.
 Thanks in advance

-- 
Rafael Taboada
Software Engineer

Cell : +511-97753290

"No creo en el destino pues no me gusta tener la idea de controlar mi vida"

Re: Showing a PDF inside a JSP

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
iText just generates the PDF on the server-side, the display issue on
the browser would still be the same because you are returning a PDF
stream back (or redirecting to a temp file, either way) and the browser
recognizes that and passes it to the plug-in for display (a plug-in
which, by the way, is perhaps the buggiest piece of garbage ever foisted
on an unsuspecting public!)

Frank

ziggler wrote:
> you can use "itext"  to realize?
> 
> 2005/8/4, Frank W. Zammetti <fz...@omnytex.com>:
> 
>>Hi Rafael,
>>
>>The only way I can think of to actually "embed" a PDF, or at least to
>>give that appearance, is to use iFrames.
>>
>>The Acrobat plug-in takes over the entire window it is shown in, which
>>when frames aren't involved is the entire client area of the browser.
>>
>>So, using frames should, in theory, work (I've never actually tried to
>>do this, so there could be hidden gotchas).  An iFrame would allow you
>>more or less to seem to "embed" the PDF.
>>
>>I'd be willing to bet there aren't any other ways to do it that aren't
>>way more trouble than they're woth, if there are any at all...
>>
>>...now that THAT gauntlet is thrown down, let the flood of messages
>>correcting me begin :)
>>
>>Frank
>>
>>Rafael Taboada wrote:
>>
>>>Hi Folks, I know my doubt is out Struts topic but I want to use ur
>>>xperiencie in my problem.
>>>
>>>I want to show a report in PDF file inside a JSP, inside a table for
>>>example. I'm surfing on the web and all sites when try to show PDF they link
>>>to this file and the PDF is showed in the entire window if the user has
>>>acrobat in his PC.
>>> Is it possible to show the PDF but embed in JSP or HTML?? I mean, I have to
>>>show a form in order to generate the PDF, and when th user click on GENERATE
>>>REPORT button, it makes a PDF file and I want to show this PDF in the same
>>>page...
>>> Do u know any place where I can find information for my doubt?.
>>> Any help would be appreciated.
>>> Thanks in advance
>>>
>>
>>--
>>Frank W. Zammetti
>>Founder and Chief Software Architect
>>Omnytex Technologies
>>http://www.omnytex.com
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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


Re: Showing a PDF inside a JSP

Posted by ziggler <zi...@gmail.com>.
you can use "itext"  to realize?

2005/8/4, Frank W. Zammetti <fz...@omnytex.com>:
> Hi Rafael,
> 
> The only way I can think of to actually "embed" a PDF, or at least to
> give that appearance, is to use iFrames.
> 
> The Acrobat plug-in takes over the entire window it is shown in, which
> when frames aren't involved is the entire client area of the browser.
> 
> So, using frames should, in theory, work (I've never actually tried to
> do this, so there could be hidden gotchas).  An iFrame would allow you
> more or less to seem to "embed" the PDF.
> 
> I'd be willing to bet there aren't any other ways to do it that aren't
> way more trouble than they're woth, if there are any at all...
> 
> ...now that THAT gauntlet is thrown down, let the flood of messages
> correcting me begin :)
> 
> Frank
> 
> Rafael Taboada wrote:
> > Hi Folks, I know my doubt is out Struts topic but I want to use ur
> > xperiencie in my problem.
> >
> > I want to show a report in PDF file inside a JSP, inside a table for
> > example. I'm surfing on the web and all sites when try to show PDF they link
> > to this file and the PDF is showed in the entire window if the user has
> > acrobat in his PC.
> >  Is it possible to show the PDF but embed in JSP or HTML?? I mean, I have to
> > show a form in order to generate the PDF, and when th user click on GENERATE
> > REPORT button, it makes a PDF file and I want to show this PDF in the same
> > page...
> >  Do u know any place where I can find information for my doubt?.
> >  Any help would be appreciated.
> >  Thanks in advance
> >
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


-- 
Fasten your seat belt. Here we go... 
笑口常开,笑天下可笑之人!

RE: 1.3.x in production (was Re: Showing a PDF inside a JSP)

Posted by Marco Mistroni <mm...@waersystems.com>.
Aha!
StrutsWS 1.3 that I have uploaded in sourceforge cvs  (strutsws project)
was 
In fact using Struts 1.3 with customization of RequestProcessor

Am I the winner :)) ?

Regards
	marco

-----Original Message-----
From: Frank W. Zammetti [mailto:fzlists@omnytex.com] 
Sent: 04 August 2005 04:12
To: Struts Users Mailing List
Subject: Re: 1.3.x in production (was Re: Showing a PDF inside a JSP)

Well, now I'm going to have to go update my blog to 1.3 just to beat you

both :)

(Nah, doesn't even REMOTELY count as a production app, I know! :) )

Frank

Wendy Smoak wrote:
> From: "Joe Germuska" <Jo...@Germuska.com>
> 
>> ... my most recent app (which may make history this weekend as the 
>> first Struts 1.3.x based webapp to go into production?  ;-) )
> 
> 
> You'll beat me by a few days, then. ;)  I have one out in test that I 
> had originally planned to leave at 1.2.7... but what fun would that
be?
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


---------------------------------------------------------------------
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: 1.3.x in production (was Re: Showing a PDF inside a JSP)

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Well, now I'm going to have to go update my blog to 1.3 just to beat you 
both :)

(Nah, doesn't even REMOTELY count as a production app, I know! :) )

Frank

Wendy Smoak wrote:
> From: "Joe Germuska" <Jo...@Germuska.com>
> 
>> ... my most recent app (which may make history this weekend as the 
>> first Struts 1.3.x based webapp to go into production?  ;-) )
> 
> 
> You'll beat me by a few days, then. ;)  I have one out in test that I 
> had originally planned to leave at 1.2.7... but what fun would that be?
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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


1.3.x in production (was Re: Showing a PDF inside a JSP)

Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Joe Germuska" <Jo...@Germuska.com>

>... my most recent app (which may make history this weekend as the first 
>Struts 1.3.x based webapp to go into production?  ;-) )

You'll beat me by a few days, then. ;)  I have one out in test that I had 
originally planned to leave at 1.2.7... but what fun would that be?

-- 
Wendy Smoak 



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


Re: Showing a PDF inside a JSP

Posted by Joe Germuska <Jo...@Germuska.com>.
At 9:44 PM -0400 8/3/05, Frank W. Zammetti wrote:
>Hi Rafael,
>
>The only way I can think of to actually "embed" a PDF, or at least 
>to give that appearance, is to use iFrames.

It works like a charm; I'm using the technique in a couple of places 
on my most recent app (which may make history this weekend as the 
first Struts 1.3.x based webapp to go into production?  ;-) )

Joe
-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Re: Showing a PDF inside a JSP

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Hi Rafael,

The only way I can think of to actually "embed" a PDF, or at least to 
give that appearance, is to use iFrames.

The Acrobat plug-in takes over the entire window it is shown in, which 
when frames aren't involved is the entire client area of the browser.

So, using frames should, in theory, work (I've never actually tried to 
do this, so there could be hidden gotchas).  An iFrame would allow you 
more or less to seem to "embed" the PDF.

I'd be willing to bet there aren't any other ways to do it that aren't 
way more trouble than they're woth, if there are any at all...

...now that THAT gauntlet is thrown down, let the flood of messages 
correcting me begin :)

Frank

Rafael Taboada wrote:
> Hi Folks, I know my doubt is out Struts topic but I want to use ur 
> xperiencie in my problem.
> 
> I want to show a report in PDF file inside a JSP, inside a table for 
> example. I'm surfing on the web and all sites when try to show PDF they link 
> to this file and the PDF is showed in the entire window if the user has 
> acrobat in his PC.
>  Is it possible to show the PDF but embed in JSP or HTML?? I mean, I have to 
> show a form in order to generate the PDF, and when th user click on GENERATE 
> REPORT button, it makes a PDF file and I want to show this PDF in the same 
> page...
>  Do u know any place where I can find information for my doubt?.
>  Any help would be appreciated.
>  Thanks in advance
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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