0 Replies Latest reply on Apr 11, 2008 12:29 PM by Tarmo Randma

    Problems with outputting a pdf file

    Tarmo Randma Newbie

      We are generating PDF files on JBOSS and tomcat using struts framework and serve them to the client. At the client they are displayed by Adobe Reader plugin inside the browser. (Windows XP, IE 6, Acrobat 7 / 8).

      However there are problems in the process if the client has Adobe Reader version 7 installed (Problem does not appear with Acrobat 8 - but it is not just Acrobat version issue, hold on). With Acrobat 7, the pdf is displayed, but not inside the browser, but in a new separate window, leaving the browser window blank. Opening the same pdf file from a local file-system through the browser was successful (file displayed inside the browser), so it should be a problem with the server.

      This is further confirmed by the fact that the same code serving pdf files on OC4J server, sends pdf files to the client and they get displayed inside the browser window just fine. On the same client machine. Obviously there is something different about how the pdf file is served. Unfortunately I cannot figure out what exactly and how to solve the problem.

      Here are the headers from both servers when they served the pdf file:

      HTTP/1.1 200 OK
      Server: Apache-Coyote/1.1
      Pragma: No-cache
      Cache-Control: no-cache
      Expires: Thu, 01 Jan 1970 02:00:00 EET
      X-Powered-By: Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231751)/Tomcat-5.5
      Content-Type: application/pdf;charset=UTF-8
      Content-Length: 605608
      Date: Fri, 11 Apr 2008 15:30:04 GMT

      Date: Fri, 11 Apr 2008 15:40:47 GMT
      Server: Oracle-Application-Server-10g/ Oracle-HTTP-Server
      Content-Length: 6358
      Set-Cookie: JSESSIONID=0a9e20Pchb0n6jAmljGr5XDqQLvpAe; path=/tvis
      Cache-Control: private
      Keep-Alive: timeout=15, max=99
      Connection: Keep-Alive
      Content-Type: application/pdf

      Do you have any idea what might be causing this behavior or do you have any other additional advice?

      Thank you kindly