[reportlab-users] Damaged pdf file in release mode Compile

Thomas Zehbe tz at ingenion.de
Tue Apr 18 09:59:38 EDT 2006


Hi All,
I'm running out of ideas to solve my damaged file Problem. I hope, that 
anybody has a helpful hint for me where to look at.
The scenario:
My Application written in C++, based on the wxWidgets-2.6.2 lib in MSW-unicode 
and unicode-debug version uses reportlab 1.20 to generate reports and 
documents. The python interpreter (currently 2.3) is linked into the app and 
called via the c api. The calling sequence is simple. The selected report 
module is loaded and then a function of this module is called with two 
parameters.

The report code connects to a PostgreSQL database to retrieve the data defined 
by the given parameters an builds a simple report using the platypus engine.
The app is compiled and linked with Visual C 6.

Using the debug version of the app I get a readable pdf doc just as expected. 
Using the release version of the app leads do a damaged pdf doc which cannot 
be opened by acrobat. Message: "The file is damaged and cannot be restored."

The files are nearly equal in size. I compared them using kate on my Linux 
box. The human readable parts seem to be the same except the sizes mentioned 
in one of three "stream parts".
The first two binary stream parts of files seem to be the same. But the last 
stream part just before "endobj" differs both in size (about 50 bytes) and 
content.

Any idea would be appreciated ....
Thanks
Thomas

-- 
Dipl.-Ing. Thomas Zehbe
INGENION GmbH
Kuhweide 6
31552 Apelern
Fon: 05043 / 40 57 904
Fax: 05043 / 40 57 907


More information about the reportlab-users mailing list