cancel
Showing results for 
Search instead for 
Did you mean: 

Mime Type not working properly for PDF generated through FOP

Former Member
0 Kudos

Hi, I have a Java module that generates a PDF using the Jakarta FOP generator. I am currently porting this module from a different J2EE server to NetWeaver. The process works find on the old J2EE server, but in NetWeaver I am receiving a blank screen when the PDF is sent back to the browser. After the PDF has been generated through FOP, I set the response content type as follows:

response.setContentType("application/pdf");

I then send the PDF stream to the browser:

response.setContentLength(content.length);

response.getOutputStream().write(content);

I have set the Mime type in my Web.xml file, but I am wondering if there is something else I have to do in NetWeaver to enable this.

We are using NetWeaver 6.30.

Any thoughts?

Thanks

Anthony

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Anthony,

could it be that your problem is caused by automatically gzip-ing PDF files by the J2EE Engine (problem is described in the SAP note 701641)? Can you check that?

Former Member
0 Kudos

Hi Ivaylo, I tried to do a search on the tech note 701641, but couldn't find it in SDN. Could you possibly point me to where it is located?

Thanks

Anthony

Former Member
0 Kudos

Hi,

actually, you do not have to search here on the SDN, but rather on the SAP Service Marketplace at http://service.sap.com/notes. Then enter the note number in the Number field in the right frame and this should bring the note up.