Really? You found that to be necassery? What specific problem does it solve (which of the MANY Acrobat problems I mean? :) ).

I ask because I spent probably a month dealing with PDF generation issues and I just last week managed to get everything working for everyone (it was one of those "it works for user A but not B, oh wait, it's tommorrow and now user B doesn't work but A does... and their PCs appear to be identical in every way"). I never tried what you suggest, and it looks to be working perfectly now, so as someone who has fought the Acrobat battle too, I'm curious.

Frank

Gary VanMatre wrote:
Excellent! I wouldn't have thought that would work, based on how screwed up the Acrobat plug-in generally is, but that's excellent!


Well, I think there was better than a week spent one line of code, actually one 
char '\r'.  You are not alone....

response.setContentType("application/pdf\r");

Gary


Frank [EMAIL PROTECTED] wrote:
I've also seen it done using the html embed tag. We used itext to deliver a

fillable pdf. You can see it action here (http://www.sos.state.co.us/biz).
type=application/pdf >

public ActionForward loadBytesIntoStream( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, String filename, byte[] bytes) throws Exception { response.setContentType("application/pdf\r"); response.setHeader( "Content-disposition", "inline; filename=" + justFilename); response.setContentLength(bytes.length); response.setHeader("Expires", "0"); response.setHeader( "Cache-Control", "must-revalidate, post-check=0, pre-check=0"); response.setHeader("Pragma", "public"); ServletOutputStream buff = response.getOutputStream(); buff.write(bytes, 0, bytes.length); bytes = null; buff.flush(); return null; } Gary -------------- Original message --------------


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 :


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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




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

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

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

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to