[reportlab-users] Re: Damaged pdf file in release mode Compile
Thomas Zehbe
tz at ingenion.de
Wed Apr 19 08:25:25 EDT 2006
Am Mittwoch, 19. April 2006 09:53 schrieb Henning von Bargen:
> > Thomas Zehbe wrote:
> >
> > I mean file streams not the PDF stream objects. If opened as
> > text then we get
> > problems because '\n' becomes '\r\n' so the lengths etc go
> > wrong. If you're just
> > using BaseDoctemplate then the filename only is used and the
> > canvas should open
> > it properly in its save method.
>
> Thomas,
>
> I don't know if this is of any relevance to your problem,
> but somewhere in the mists of my memories I think I once
> read about compiling Python (on another platform, though)
> that compiler optimizations can result in wrong code.
>
> Perhaps you should (as a first effort) disable all optimizations
> in your release build, check if the program is working, and then
> - step by step - enable the differenz optimizer options again.
>
> Just my 0,02 EUR
> Henning
Hi Henning,
Thanks for your hint! But I think your case doesn't apply because I'm using
the python lib "as is". I simply call a hand full of functions from that lib
from a single C++ objects method. And as the calling convention remains the
same in optimized code all the parameters should be pushed on the stack as
usual. There must be something wrong in the executables environment or in the
code selected by the linker. Who knows. It's remarkable that the interpreter
doesn't crash. The pdf file is created and looks ok at first sight. The fix
would be easier if acrobat would produce a more elaborated error message
instead of "oh, somethings wrong here" ...
Using Ghostscript from the commandline at least gives this message:
**** Warning: An error occurred while reading an XREF table.
But I'll test switching off the optimizer for the sources which include
python.
Regards
Thomas
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
--
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