-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#373 Fix for a regression when image sizing with max-width/height.
Was broken when intrinsic width or height were greater than max-width or max-height. Thanks again @rototor. Public domain images provided by pexabay at www.pexels.com Co-Authored-By: Emmeran Seehuber <rototor@rototor.de>
- Loading branch information
Showing
6 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+103 KB
openhtmltopdf-examples/src/main/resources/demos/images/landscape-sydney.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+89 KB
openhtmltopdf-examples/src/main/resources/demos/images/portrait-shuttle.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+195 KB
...tmltopdf-examples/src/main/resources/visualtest/expected/replaced-img-in-table-cell-3.pdf
Binary file not shown.
43 changes: 43 additions & 0 deletions
43
openhtmltopdf-examples/src/main/resources/visualtest/html/replaced-img-in-table-cell-3.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<html> | ||
<head> | ||
<style> | ||
@page { | ||
size: 500px 800px; | ||
margin: 0; | ||
} | ||
body { | ||
max-width: 500px; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<table style="width:100%; border: 3px solid black;"> | ||
<tr> | ||
<td style="border: 1px solid green;"> | ||
<img src="../../demos/images/landscape-sydney.jpg" | ||
style="max-height:100px; max-width:200px;"/> | ||
<img src="../../demos/images/portrait-shuttle.jpg" | ||
style="max-height:100px; max-width:200px;"/> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td style="border: 1px solid green;"> | ||
<img src="../../demos/images/landscape-sydney.jpg" | ||
style="max-height:100px; "/> | ||
<img src="../../demos/images/portrait-shuttle.jpg" | ||
style="max-height:100px; "/> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td style="border: 1px solid green;"> | ||
<img src="../../demos/images/landscape-sydney.jpg" | ||
style="max-width:200px;"/> | ||
<img src="../../demos/images/portrait-shuttle.jpg" | ||
style="max-width:200px;"/> | ||
</td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters