Damaged pdf response from jasperserver on openerp V7 / windows platform

Bug #1138087 reported by Sofien Karray
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
JasperReport Server Connector
Status tracked in 7.0
7.0
Fix Released
High
Christophe CHAUVET

Bug Description

I have installed jasper_server on openerp v7 on a windows plateform.

I make a few corrections:
# d_par ['company_footer1'] ='' or cny.rml_footer1
# d_par ['company_footer2'] ='' or cny.rml_footer2
d_par ['company_street'] ='' or cny.street
d_par ['company_street2'] ='' or cny.street
d_par ['company_zip'] ='' or cny.zip
d_par ['company_city'] ='' or cny.city
d_par ['company_country'] ='' or cny.country_id.name
d_par ['company_phone'] ='' or cny.phone
d_par ['company_fax'] ='' or cny.fax
d_par ['company_mail'] ='' or cny.email

finally the request communicates with the server.
unfortunately the response is a corrupted pdf file !

see the attachment file

Revision history for this message
Sofien Karray (skarray-b) wrote :
Revision history for this message
Christophe CHAUVET (christophe-chauvet) wrote :

Hi

A port version for V7 is available at Github https://github.com/syleam/openerp-jasperserver

Regards,

Revision history for this message
Sofien Karray (skarray-b) wrote :

Thank you for this version,
I tested it. the error still exists.
Is it has been fixed or not yet?

Thank you for your support

Revision history for this message
DBVIJ (dbvij) wrote :

Hi,
For windows, file needs to be opened in binary mode : you need to append 'b' to open ()
Therefore in file \jasper_server\report, you need to modify as follow

line 437
--- fp = open(pdf, 'r')
+++ fp = open(pdf, 'rb')

line 449
--- fp = open(pdf_list[0], 'r')
+++ fp = open(pdf_list[0], 'rb')

Best regards

Revision history for this message
etoanik (etoanik) wrote :

it's work, thx

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.