Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images sometimes overlap proceeding text. #1575

Open
zilles opened this issue Oct 17, 2017 · 2 comments · May be fixed by #2762
Open

Images sometimes overlap proceeding text. #1575

zilles opened this issue Oct 17, 2017 · 2 comments · May be fixed by #2762
Milestone

Comments

@zilles
Copy link

zilles commented Oct 17, 2017

I'm seeing an issue with an image overlapping previous text.
Expected results: 6 lines of text and then the image.
Observed result: 2 lines of text and then image overlapping the last 4.

PHP Version 7.0.24 (32 bit Thread safe)
Windows 10

ImageBugReport.zip

Unzip the zip file in a dompdf directory to see an example.

Here is the php:

<?php
require_once '../lib/html5lib/Parser.php';
require_once '../lib/php-font-lib/src/FontLib/Autoloader.php';
require_once '../lib/php-svg-lib/src/autoload.php';
require_once '../src/Autoloader.php';
Dompdf\Autoloader::register();

$dompdf = new Dompdf\Dompdf();

$html =  <<<'EOD'
<!DOCTYPE html>
<html>
<body>
Line #1<br />
Line #2<br />
Line #3<br />
Line #4<br />
Line #5<br />
Line #6
<img src="img784B.tmp.jpg"  />
<br/>
</body>
</html>
EOD;


$dompdf->loadHtml($html);
$dompdf->render();
$dompdf->stream("test.pdf", array("Attachment" => false));
@bsweeney bsweeney added this to the 0.9.0 milestone Oct 18, 2017
@bsweeney
Copy link
Member

There's potentially a few things going on here, but the biggest problem is that the line height calculation is off. I noticed that we weren't really doing a good job with that calculation as I was working on some issues for the 0.8.0 release.

@XaphanBael
Copy link

XaphanBael commented Jan 29, 2018

So, i'm having the same issue running 8.0.2, any eta on this as it's a pain in the rectum.

P.s. on my development machine (Windows 10, Wamp 3.0.6, PHP 7.0.10) it's working correctly, on the actual server (Linux, PHP 7.0.x) it's bugging.

@bsweeney bsweeney modified the milestones: 0.9.0, dompdf-next Nov 16, 2020
@bsweeney bsweeney modified the milestones: dompdf-next, 1.1.1 Nov 4, 2021
@bsweeney bsweeney added layout and removed On Deck labels Nov 4, 2021
@bsweeney bsweeney modified the milestones: 2.0.1, 2.0.2 Aug 25, 2022
@bsweeney bsweeney linked a pull request Aug 25, 2022 that will close this issue
@bsweeney bsweeney modified the milestones: 2.0.2, 2.0.3 Dec 29, 2022
@bsweeney bsweeney modified the milestones: 3.0.1, 3.1.0 May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants