Forum Bugs

One large image builds in PDF output; another does not

mgk81
This image appears just fine in HTML output and in PDF output from Prince. This image is 2,162 x 446 px.

However, this image appears in HTML output just fine but is missing in PDF output. There's just a blank space on the page and on the following page. This image is 2,144 x 1,173 px.

Why did the image simply not go to the next page? Is there a maximum height or width image size limit for PDF generation? The first image (which works) is wider than the second image (which doesn't); however, the second image is taller (but certainly not taller than the PDF page...or is it?).

I would appreciate any help with this.
markbrown
Hi,

Thanks for the bug report.

Unfortunately we still have some problems with column flex containers. We're working towards a solution, but in the meantime a possible workaround would be to put 'display:block' on the <body> element. Please let us know if that doesn't work for you.

Mark
mgk81
Mark,

This isn't going to work for my implementation. My Jekyll template is built by using
display:flex;
...unless there's a way for me to somehow only do this for PDF output. Do you know if this can be profiled somehow?

Thanks,

-- MK

Edited by mgk81

markbrown
Hi MK,

You can use media queries to ensure that only print is affected, as follows:
@media print {
    body { display: block !important; }
}


Alternatively, if you can't include custom CSS in your template, you might be able to use the '-s' option on the Prince command line to include the extra CSS.

Mark
mgk81
Thank you, markbrown—this is exactly what I needed! :)