Wrong chars on double pdf files

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 333
Joined: Wed Jan 20, 2010 1:15 pm

Wrong chars on double pdf files

Post by dkaip »

Hello.
If i try to add 2 times the same pdf file, the result is wrong.
I just send the 1.pdf file and the result in 2.pdf in zip 12.zip file.
Thank you
Jim.
Attachments
12.zip
(108.4 KiB) Downloaded 127 times
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Wrong chars on double pdf files

Post by utelle »

dkaip wrote:If i try to add 2 times a pdf file, the result is wrong.
I just send the 1.pdf file and the result in 2.pdf in zip 12.zip file.
You could call this a bug in wxPdfDocument. wxPdfDocument keeps a list of PDF parsers for each PDF document, for which method SetSourceFile is invoked. However, it was not checked whether a parser for a document with the given filename is already in the list. This results in corrupting the resource object list of the previous parser, if the same filename is presented to method SetSourceFile more than once..

I adjusted method SetSourceFile to detect whether a parser already exists. The adjusted version worked for me.

Please download the latest wxPdfDocument from https://github.com/utelle/wxpdfdoc.

Regards,

Ulrich
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 333
Joined: Wed Jan 20, 2010 1:15 pm

Re: Wrong chars on double pdf files

Post by dkaip »

Hello. It works very fine now.
Thank you.
Jim
Post Reply