pdf not working

2005-05-04 Thread Maarten Janssen
Hi all,

Iam trying to call a link to a new window and that's calling a pdf document
thats somewhere in my folder under webapps.
The problem is that the pdf is not shown. If i try it with an image it will
be displayed correctly. I am using Tomcat 5.5.

Maarten
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005


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



Re: pdf not working

2005-05-04 Thread Parsons Technical Services
What browser are you using?
Doug
- Original Message - 
From: Maarten Janssen [EMAIL PROTECTED]
To: Tomcat User List tomcat-user@jakarta.apache.org
Sent: Wednesday, May 04, 2005 6:04 AM
Subject: pdf not working


Hi all,
Iam trying to call a link to a new window and that's calling a pdf 
document
thats somewhere in my folder under webapps.
The problem is that the pdf is not shown. If i try it with an image it 
will
be displayed correctly. I am using Tomcat 5.5.

Maarten
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


RE: pdf not working

2005-05-04 Thread Maarten Janssen
hI.

I am using internet explorer. The problem is when I open it as a file system
file (i.e. d:\etc..\x.pdf) it works.
But a relative path to a folder in my webapps it is NOT working.

Maarten

-Oorspronkelijk bericht-
Van: Parsons Technical Services [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 4 mei 2005 13:20
Aan: Tomcat Users List
Onderwerp: Re: pdf not working


What browser are you using?

Doug


- Original Message -
From: Maarten Janssen [EMAIL PROTECTED]
To: Tomcat User List tomcat-user@jakarta.apache.org
Sent: Wednesday, May 04, 2005 6:04 AM
Subject: pdf not working


 Hi all,

 Iam trying to call a link to a new window and that's calling a pdf
 document
 thats somewhere in my folder under webapps.
 The problem is that the pdf is not shown. If i try it with an image it
 will
 be displayed correctly. I am using Tomcat 5.5.

 Maarten
 --
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005


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






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

--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005


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



Re: pdf not working

2005-05-04 Thread Jay Hulslander
Just so I understand, file.jpg is hosted fine back to a browser.  File.pdf, 
in the same location, is not hosted back to the browser find.  Is that what 
you are experiencing?  Sounds like tomcat is configured to execute pdf 
documents as opposed to hosting them.  Much like you would configure a web 
server to execute streaming video as opposed to just hosting a video to be 
downloaded.  I do not know where this configuration is done in Tomcat, but 
that is where I would start.
-Jay
At 06:04 AM 5/4/2005, you wrote:
Hi all,
Iam trying to call a link to a new window and that's calling a pdf document
thats somewhere in my folder under webapps.
The problem is that the pdf is not shown. If i try it with an image it will
be displayed correctly. I am using Tomcat 5.5.
Maarten
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Re: pdf not working

2005-05-04 Thread Michael McQuade
I have the exact opposite of your problem,   and I have no idea why mine
works,  I want to display a PDF file in the Browser Window from a list of
documents. It may be JPG, DOC, BMP, PDF, whatever..  And then I want
to be able to VIEW the document FULL SCREEN, and send it out to WORD,  or
ADOBE, etc, depending on the document type.

A JPG or BMP  will display in my Browser when selected successfully and go
out to a separate window (I.E.)   successfully if I hit VIEW FULL SCREEN

a  PDF, will NOT display in my current browser window,  but if I hit VIEW
full screen it will go out to Adobe Reader,   which is what I want it to
do  I made NO changes to Tomcat to make this happen.

Mike


- Original Message - 
From: Maarten Janssen [EMAIL PROTECTED]
To: Tomcat User List tomcat-user@jakarta.apache.org
Sent: Wednesday, May 04, 2005 6:04 AM
Subject: pdf not working


 Hi all,

 Iam trying to call a link to a new window and that's calling a pdf
document
 thats somewhere in my folder under webapps.
 The problem is that the pdf is not shown. If i try it with an image it
will
 be displayed correctly. I am using Tomcat 5.5.

 Maarten
 --
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005


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


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



RE: pdf not working

2005-05-04 Thread David B. Saul
Here is what worked for me. The PDF is created dynamically.

1. a small bit of code which used FOP and served it as a stream. Be sure to
set the response type.

  byte[] fo;
  .
  .
  .
  InputSource fopInput = new InputSource( new ByteArrayInputStream( fo )
);
  ByteArrayOutputStream outStream = new ByteArrayOutputStream();
  Driver driver = new Driver( fopInput, outStream );
  driver.setLogger(log);
  driver.setRenderer(Driver.RENDER_PDF);
  driver.run();
  output = outStream.toByteArray();

  response.setContentType(application/pdf);
  response.resetBuffer();
  response.setContentLength(output.length);
  ServletOutputStream os = response.getOutputStream();
  os.write(output);
  os.close();

2. Also added to the URL at the end was the following:

pdf=.pdf\

   Can't remember where I found this idea, nor can I find it at this minute,
but it made it work.

hth,
Dave




-Original Message-
From: Jay Hulslander [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 04, 2005 6:17 AM
To: Tomcat Users List
Subject: Re: pdf not working


Just so I understand, file.jpg is hosted fine back to a browser.  File.pdf, 
in the same location, is not hosted back to the browser find.  Is that what 
you are experiencing?  Sounds like tomcat is configured to execute pdf 
documents as opposed to hosting them.  Much like you would configure a web 
server to execute streaming video as opposed to just hosting a video to be 
downloaded.  I do not know where this configuration is done in Tomcat, but 
that is where I would start.
-Jay
At 06:04 AM 5/4/2005, you wrote:
Hi all,

Iam trying to call a link to a new window and that's calling a pdf 
document thats somewhere in my folder under webapps. The problem is 
that the pdf is not shown. If i try it with an image it will be 
displayed correctly. I am using Tomcat 5.5.

Maarten
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005


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


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


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



RE: pdf not working

2005-05-04 Thread Phillip Qin
I think your point 2 is more important. I found out that in IE, I have to
append .pdf somewhere in the url otherwise the ActiveX control that
interprets pdf simple wouldn't work. In my piece of work, I use
http://www.mydomain.com/myapp/statement.pdf?myquerystring... Mozilla/Firefox
has no such problem.

-Original Message-
From: David B. Saul [mailto:[EMAIL PROTECTED] 
Sent: May 4, 2005 12:51 PM
To: 'Tomcat Users List'
Subject: RE: pdf not working


Here is what worked for me. The PDF is created dynamically.

1. a small bit of code which used FOP and served it as a stream. Be sure to
set the response type.

  byte[] fo;
  .
  .
  .
  InputSource fopInput = new InputSource( new ByteArrayInputStream( fo )
);
  ByteArrayOutputStream outStream = new ByteArrayOutputStream();
  Driver driver = new Driver( fopInput, outStream );
  driver.setLogger(log);
  driver.setRenderer(Driver.RENDER_PDF);
  driver.run();
  output = outStream.toByteArray();

  response.setContentType(application/pdf);
  response.resetBuffer();
  response.setContentLength(output.length);
  ServletOutputStream os = response.getOutputStream();
  os.write(output);
  os.close();

2. Also added to the URL at the end was the following:

pdf=.pdf\

   Can't remember where I found this idea, nor can I find it at this minute,
but it made it work.

hth,
Dave




-Original Message-
From: Jay Hulslander [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 04, 2005 6:17 AM
To: Tomcat Users List
Subject: Re: pdf not working


Just so I understand, file.jpg is hosted fine back to a browser.  File.pdf, 
in the same location, is not hosted back to the browser find.  Is that what 
you are experiencing?  Sounds like tomcat is configured to execute pdf 
documents as opposed to hosting them.  Much like you would configure a web 
server to execute streaming video as opposed to just hosting a video to be 
downloaded.  I do not know where this configuration is done in Tomcat, but 
that is where I would start.
-Jay
At 06:04 AM 5/4/2005, you wrote:
Hi all,

Iam trying to call a link to a new window and that's calling a pdf
document thats somewhere in my folder under webapps. The problem is 
that the pdf is not shown. If i try it with an image it will be 
displayed correctly. I am using Tomcat 5.5.

Maarten
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005


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


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


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


!DSPAM:4278d3bc82251395011244!


RE: pdf not working

2005-05-04 Thread David B. Saul
Yes - I did some looking on the MS site and found that the earlier IE
browsers were making three requests while 5.5 makes two. Haven't found what
6 is doing. But setting the response type, length, adding the pdf=.pdf\
works. In addition the same kind of thing helped with SVG - but slightly
different - (i.e. MIME=image/svg) as part of the URL.

You comment about the ActiveX is important as well according to what I found
searching MS. 

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 04, 2005 7:25 AM
To: 'Tomcat Users List'
Subject: RE: pdf not working


I think your point 2 is more important. I found out that in IE, I have to
append .pdf somewhere in the url otherwise the ActiveX control that
interprets pdf simple wouldn't work. In my piece of work, I use
http://www.mydomain.com/myapp/statement.pdf?myquerystring... Mozilla/Firefox
has no such problem.

-Original Message-
From: David B. Saul [mailto:[EMAIL PROTECTED] 
Sent: May 4, 2005 12:51 PM
To: 'Tomcat Users List'
Subject: RE: pdf not working


Here is what worked for me. The PDF is created dynamically.

1. a small bit of code which used FOP and served it as a stream. Be sure to
set the response type.

  byte[] fo;
  .
  .
  .
  InputSource fopInput = new InputSource( new ByteArrayInputStream( fo )
);
  ByteArrayOutputStream outStream = new ByteArrayOutputStream();
  Driver driver = new Driver( fopInput, outStream );
  driver.setLogger(log);
  driver.setRenderer(Driver.RENDER_PDF);
  driver.run();
  output = outStream.toByteArray();

  response.setContentType(application/pdf);
  response.resetBuffer();
  response.setContentLength(output.length);
  ServletOutputStream os = response.getOutputStream();
  os.write(output);
  os.close();

2. Also added to the URL at the end was the following:

pdf=.pdf\

   Can't remember where I found this idea, nor can I find it at this minute,
but it made it work.

hth,
Dave




-Original Message-
From: Jay Hulslander [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 04, 2005 6:17 AM
To: Tomcat Users List
Subject: Re: pdf not working


Just so I understand, file.jpg is hosted fine back to a browser.  File.pdf, 
in the same location, is not hosted back to the browser find.  Is that what 
you are experiencing?  Sounds like tomcat is configured to execute pdf 
documents as opposed to hosting them.  Much like you would configure a web 
server to execute streaming video as opposed to just hosting a video to be 
downloaded.  I do not know where this configuration is done in Tomcat, but 
that is where I would start.
-Jay
At 06:04 AM 5/4/2005, you wrote:
Hi all,

Iam trying to call a link to a new window and that's calling a pdf 
document thats somewhere in my folder under webapps. The problem is 
that the pdf is not shown. If i try it with an image it will be 
displayed correctly. I am using Tomcat 5.5.

Maarten
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005


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


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


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


!DSPAM:4278d3bc82251395011244!


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



RE: pdf not working

2005-05-04 Thread Diogo Quintela \(EF\)
Hello

Try adding the following any of the following response headers:
Content-Type, application/pdf
And any of the follwing..
Content-disposition,inline; filename=example.pdf
Content-disposition,attachment; filename=example.pdf
Content-disposition,filename= example.pdf


Diogo Quintela

@see http://support.microsoft.com/support/kb/articles/Q260/5/19.ASP
@see http://support.microsoft.com/support/kb/articles/Q279/6/67.ASP

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: quarta-feira, 4 de Maio de 2005 15:25
To: 'Tomcat Users List'
Subject: RE: pdf not working

I think your point 2 is more important. I found out that in IE, I have to
append .pdf somewhere in the url otherwise the ActiveX control that
interprets pdf simple wouldn't work. In my piece of work, I use
http://www.mydomain.com/myapp/statement.pdf?myquerystring... Mozilla/Firefox
has no such problem.

-Original Message-
From: David B. Saul [mailto:[EMAIL PROTECTED] 
Sent: May 4, 2005 12:51 PM
To: 'Tomcat Users List'
Subject: RE: pdf not working


Here is what worked for me. The PDF is created dynamically.

1. a small bit of code which used FOP and served it as a stream. Be sure to
set the response type.

  byte[] fo;
  .
  .
  .
  InputSource fopInput = new InputSource( new ByteArrayInputStream( fo )
);
  ByteArrayOutputStream outStream = new ByteArrayOutputStream();
  Driver driver = new Driver( fopInput, outStream );
  driver.setLogger(log);
  driver.setRenderer(Driver.RENDER_PDF);
  driver.run();
  output = outStream.toByteArray();

  response.setContentType(application/pdf);
  response.resetBuffer();
  response.setContentLength(output.length);
  ServletOutputStream os = response.getOutputStream();
  os.write(output);
  os.close();

2. Also added to the URL at the end was the following:

pdf=.pdf\

   Can't remember where I found this idea, nor can I find it at this minute,
but it made it work.

hth,
Dave




-Original Message-
From: Jay Hulslander [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 04, 2005 6:17 AM
To: Tomcat Users List
Subject: Re: pdf not working


Just so I understand, file.jpg is hosted fine back to a browser.  File.pdf, 
in the same location, is not hosted back to the browser find.  Is that what 
you are experiencing?  Sounds like tomcat is configured to execute pdf 
documents as opposed to hosting them.  Much like you would configure a web 
server to execute streaming video as opposed to just hosting a video to be 
downloaded.  I do not know where this configuration is done in Tomcat, but 
that is where I would start.
-Jay
At 06:04 AM 5/4/2005, you wrote:
Hi all,

Iam trying to call a link to a new window and that's calling a pdf
document thats somewhere in my folder under webapps. The problem is 
that the pdf is not shown. If i try it with an image it will be 
displayed correctly. I am using Tomcat 5.5.

Maarten
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005


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


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


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


!DSPAM:4278d3bc82251395011244!


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



RE: pdf not working

2005-05-04 Thread Diogo Quintela \(EF\)
Next time I promise I'll read it before clicking Send. :-)
Diogo

-Original Message-
From: Diogo Quintela (EF) [mailto:[EMAIL PROTECTED] 
Sent: quarta-feira, 4 de Maio de 2005 17:01
To: 'Tomcat Users List'
Subject: RE: pdf not working

Hello

Try adding the following any of the following response headers:
Content-Type, application/pdf
And any of the follwing..
Content-disposition,inline; filename=example.pdf
Content-disposition,attachment; filename=example.pdf
Content-disposition,filename= example.pdf


Diogo Quintela

@see http://support.microsoft.com/support/kb/articles/Q260/5/19.ASP
@see http://support.microsoft.com/support/kb/articles/Q279/6/67.ASP

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: quarta-feira, 4 de Maio de 2005 15:25
To: 'Tomcat Users List'
Subject: RE: pdf not working

I think your point 2 is more important. I found out that in IE, I have to
append .pdf somewhere in the url otherwise the ActiveX control that
interprets pdf simple wouldn't work. In my piece of work, I use
http://www.mydomain.com/myapp/statement.pdf?myquerystring... Mozilla/Firefox
has no such problem.

-Original Message-
From: David B. Saul [mailto:[EMAIL PROTECTED] 
Sent: May 4, 2005 12:51 PM
To: 'Tomcat Users List'
Subject: RE: pdf not working


Here is what worked for me. The PDF is created dynamically.

1. a small bit of code which used FOP and served it as a stream. Be sure to
set the response type.

  byte[] fo;
  .
  .
  .
  InputSource fopInput = new InputSource( new ByteArrayInputStream( fo )
);
  ByteArrayOutputStream outStream = new ByteArrayOutputStream();
  Driver driver = new Driver( fopInput, outStream );
  driver.setLogger(log);
  driver.setRenderer(Driver.RENDER_PDF);
  driver.run();
  output = outStream.toByteArray();

  response.setContentType(application/pdf);
  response.resetBuffer();
  response.setContentLength(output.length);
  ServletOutputStream os = response.getOutputStream();
  os.write(output);
  os.close();

2. Also added to the URL at the end was the following:

pdf=.pdf\

   Can't remember where I found this idea, nor can I find it at this minute,
but it made it work.

hth,
Dave




-Original Message-
From: Jay Hulslander [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 04, 2005 6:17 AM
To: Tomcat Users List
Subject: Re: pdf not working


Just so I understand, file.jpg is hosted fine back to a browser.  File.pdf, 
in the same location, is not hosted back to the browser find.  Is that what 
you are experiencing?  Sounds like tomcat is configured to execute pdf 
documents as opposed to hosting them.  Much like you would configure a web 
server to execute streaming video as opposed to just hosting a video to be 
downloaded.  I do not know where this configuration is done in Tomcat, but 
that is where I would start.
-Jay
At 06:04 AM 5/4/2005, you wrote:
Hi all,

Iam trying to call a link to a new window and that's calling a pdf
document thats somewhere in my folder under webapps. The problem is 
that the pdf is not shown. If i try it with an image it will be 
displayed correctly. I am using Tomcat 5.5.

Maarten
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005


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


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


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


!DSPAM:4278d3bc82251395011244!


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


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



RE: pdf not working

2005-05-04 Thread Phillip Qin
Has Content-Disposition become standard or just a recommendation?

-Original Message-
From: Diogo Quintela (EF) [mailto:[EMAIL PROTECTED] 
Sent: May 4, 2005 12:10 PM
To: 'Tomcat Users List'
Subject: RE: pdf not working


Next time I promise I'll read it before clicking Send. :-) Diogo

-Original Message-
From: Diogo Quintela (EF) [mailto:[EMAIL PROTECTED] 
Sent: quarta-feira, 4 de Maio de 2005 17:01
To: 'Tomcat Users List'
Subject: RE: pdf not working

Hello

Try adding the following any of the following response headers:
Content-Type, application/pdf And any of the follwing..
Content-disposition,inline; filename=example.pdf
Content-disposition,attachment; filename=example.pdf
Content-disposition,filename= example.pdf


Diogo Quintela

@see http://support.microsoft.com/support/kb/articles/Q260/5/19.ASP
@see http://support.microsoft.com/support/kb/articles/Q279/6/67.ASP

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: quarta-feira, 4 de Maio de 2005 15:25
To: 'Tomcat Users List'
Subject: RE: pdf not working

I think your point 2 is more important. I found out that in IE, I have to
append .pdf somewhere in the url otherwise the ActiveX control that
interprets pdf simple wouldn't work. In my piece of work, I use
http://www.mydomain.com/myapp/statement.pdf?myquerystring... Mozilla/Firefox
has no such problem.

-Original Message-
From: David B. Saul [mailto:[EMAIL PROTECTED] 
Sent: May 4, 2005 12:51 PM
To: 'Tomcat Users List'
Subject: RE: pdf not working


Here is what worked for me. The PDF is created dynamically.

1. a small bit of code which used FOP and served it as a stream. Be sure to
set the response type.

  byte[] fo;
  .
  .
  .
  InputSource fopInput = new InputSource( new ByteArrayInputStream( fo )
);
  ByteArrayOutputStream outStream = new ByteArrayOutputStream();
  Driver driver = new Driver( fopInput, outStream );
  driver.setLogger(log);
  driver.setRenderer(Driver.RENDER_PDF);
  driver.run();
  output = outStream.toByteArray();

  response.setContentType(application/pdf);
  response.resetBuffer();
  response.setContentLength(output.length);
  ServletOutputStream os = response.getOutputStream();
  os.write(output);
  os.close();

2. Also added to the URL at the end was the following:

pdf=.pdf\

   Can't remember where I found this idea, nor can I find it at this minute,
but it made it work.

hth,
Dave




-Original Message-
From: Jay Hulslander [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 04, 2005 6:17 AM
To: Tomcat Users List
Subject: Re: pdf not working


Just so I understand, file.jpg is hosted fine back to a browser.  File.pdf, 
in the same location, is not hosted back to the browser find.  Is that what 
you are experiencing?  Sounds like tomcat is configured to execute pdf 
documents as opposed to hosting them.  Much like you would configure a web 
server to execute streaming video as opposed to just hosting a video to be 
downloaded.  I do not know where this configuration is done in Tomcat, but 
that is where I would start.
-Jay
At 06:04 AM 5/4/2005, you wrote:
Hi all,

Iam trying to call a link to a new window and that's calling a pdf 
document thats somewhere in my folder under webapps. The problem is 
that the pdf is not shown. If i try it with an image it will be 
displayed correctly. I am using Tomcat 5.5.

Maarten
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 3-5-2005


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


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


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





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


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


!DSPAM:4278f46d100932250632097!