[reportlab-users] pdfgen creates corrupted pdf files
Thomas Zehbe
tz at ingenion.de
Wed Dec 8 06:54:35 EST 2004
Hi all,
I'm programming an app using wxWidgets and VC++ 6.0 on windows.
To produce reports and documents I use the platypus engine. To run the reports
I use the python C++ api linked into the app.
Everything works fine just until I try use some Microsoft stuff :-((
What I do is to generate a pdf and then mail it using simple Mapi
(MAPI32.dll). The mapi is not called from pyhton but directly from C++.
The problem:
Before the first call to the mapi the app generates pdfs without any problems.
After calling the mapi once pdfgen still generates pdf-files but they are
corrupted. Unreadeable with Acrobat on Windows and LINUX and with KGostview.
I checked the contents with an Editor. At first sight the corrupte files seem
to be ok.
But there are some differences. Example
File ok:
...
<< /Contents 8 0 R
/MediaBox [ 0
0
595.2756
841.8898 ]
/Parent 7 0 R
...
File corrupted:
...
<< /Contents 8 0 R
/MediaBox [ 0
0
595,2756
841,8898 ]
/Parent 7 0 R
...
As one can see the decimal paper size (I believe) numbers have changed the
decimal point representation from "." to ",".
And the binary data streamis somewhat different in size an looks totally
different due to encoding.
There are no error messages like tracebacks in the logfile I use. The Current
locale (german) seems not to be chagend by the mapi calls because all forms
work well before and after.
The behaviour is not report depent. All reports fail after a mapi call.
And its the same with 1.19 and 1.20.
Any hints would be very appreciated!
Thanks
--
Thomas Zehbe
INGENION GmbH
Luther Weg 50
31515 Wunstorf
Tel 05031-902042
Fax 05031-902049
www.ingenion.de
More information about the reportlab-users
mailing list