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
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 215
Joined: Wed Jan 20, 2010 1:15 pm

Wrong chars on double pdf files

Post by dkaip » Thu Jul 19, 2018 6:28 pm

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 12 times

utelle
Moderator
Moderator
Posts: 842
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Wrong chars on double pdf files

Post by utelle » Thu Jul 19, 2018 9:07 pm

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
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 215
Joined: Wed Jan 20, 2010 1:15 pm

Re: Wrong chars on double pdf files

Post by dkaip » Fri Jul 20, 2018 11:12 am

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

Post Reply