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

Problem inserting a certain pdf file.

Post by dkaip » Mon Aug 27, 2018 9:24 pm

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

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

Re: Problem inserting a certain pdf file.

Post by utelle » Tue Aug 28, 2018 8:05 am

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