diff --git a/doc/pdfio.md b/doc/pdfio.md index 03ef6d3..ca1298e 100644 --- a/doc/pdfio.md +++ b/doc/pdfio.md @@ -763,6 +763,9 @@ pdfio_obj_t *img = /*interpolate*/true); ``` +> Note: Currently `pdfioFileCreateImageObjFromFile` does not support 12 bit JPEG +> files or PNG files with an alpha channel. + ### Page Dictionary Functions diff --git a/examples/md2pdf.c b/examples/md2pdf.c index ae17636..54272ed 100644 --- a/examples/md2pdf.c +++ b/examples/md2pdf.c @@ -780,7 +780,7 @@ format_code(docdata_t *dd, // I - Document data lineheight = SIZE_CODEBLOCK * LINE_HEIGHT; dd->y -= 2.0 * lineheight; - if (dd->y < dd->art_box.y1) + if ((dd->y - lineheight) < dd->art_box.y1) { new_page(dd); @@ -1397,7 +1397,7 @@ render_line(docdata_t *dd, // I - Document data } dd->y -= margin_top + lineheight; - if (dd->y < dd->art_box.y1) + if ((dd->y - (margin_top > 0.0 ? lineheight : 0.0)) < dd->art_box.y1) { new_page(dd);