Image Cut Off

92 views
Skip to first unread message

Marc J. Cawood

unread,
May 26, 2010, 2:54:25 AM5/26/10
to dompdf
We have HTML articles with images in them which are sometimes cut off
in the PDF export. It seems that dompdf is near the bottom of a page,
say 100px from bottom, adds a 200px high image and does not know that
it won't fit. Thus half the image is missing. The width/height tags
are present in the HTML.

BrianS

unread,
May 30, 2010, 9:51:48 PM5/30/10
to dompdf
It looks like DOMPDF's handling of loose images (an image in the body
not surrounded by a block element) is buggy. You can work around this
by placing images in some kind of block element (e.g. a <p> or <div>).

Marc J. Cawood

unread,
Jun 3, 2010, 8:35:33 AM6/3/10
to dompdf
Adding a <p> or <div> completely screws things up. All following
images appear on top of each other.

BrianS

unread,
Jun 3, 2010, 11:45:14 AM6/3/10
to dompdf
On Jun 3, 8:35 am, "Marc J. Cawood" <cawo...@gmail.com> wrote:
> Adding a <p> or <div> completely screws things up. All following
> images appear on top of each other.

Do you have a sample document we can test against?
Reply all
Reply to author
Forward
0 new messages