Problem inserting a certain pdf file.

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

Problem inserting a certain pdf file.

Postby 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 6 times

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

Re: Problem inserting a certain pdf file.

Postby 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


Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 2 guests