Problem inserting a certain pdf file.

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

Problem inserting a certain pdf file.

Post by dkaip »

Hello. In certain pdf file that i upload there is problem inserting the page.
../src/common/mstream.cpp(196): assert "buffer" failed in CopyTo(): must have buffer to CopyTo

Code: Select all

        int tpl = pdfile.ImportPage(1);
Thank you.
Jim
Attachments
probl.pdf.zip
(432.67 KiB) Downloaded 140 times
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Problem inserting a certain pdf file.

Post by utelle »

dkaip wrote:Hello. In certain pdf file that i upload there is problem inserting the page.
../src/common/mstream.cpp(196): assert "buffer" failed in CopyTo(): must have buffer to CopyTo

Code: Select all

        int tpl = pdfile.ImportPage(1);
IMHO the PDF file is somewhat crippled, because it contains an absolutely empty page content stream. And this empty stream caused the assertion.

However, I have fixed wxPdfDocument to silently ignore empty page content streams.

Regards,

Ulrich
Post Reply