An HTML to PDF library for the JVM. Based on Flying Saucer and Apache PDF-BOX 2. With SVG image support. Now also with accessible PDF support (WCAG, Section 508, PDF/UA)!
<html>
<head>
<style>
@page {
size: 200px 250px;
margin: 10px 10px 10px 10px;
}
html {
font-family: sans-serif;
font-size: 14px;
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
With margin-left on table
<table style="width: 100%; margin-left: 15px; border: 0;">
<tr>
<td style="width: 60px;">Label:</td>
<td>a a a a a a a a a a a a a a a a a a a a a a</td>
</tr>
</table>
<br/><br/>
Without margin-left on table
<table style="width: 100%; border: 0;">
<tr>
<td style="width: 11px;"></td> <!-- workaround using empty cell -->
<td style="width: 60px;">Label:</td>
<td>a a a a a a a a a a a a a a a a a a a a a a</td>
</tr>
</table>
</body>
</html>
This results in the pdf below (using sandbox or on my local project using version 1.0.10):
I could workaround the problem by not using margin-left, and instead I used an empty cell.
However, it doesnt hurt to report the issue.
Thanks for this great library. Hope you can continue this great work.
Hello,
I found an issue when using margin-left on table.
Reproducer:
This results in the pdf below (using sandbox or on my local project using version 1.0.10):
I could workaround the problem by not using margin-left, and instead I used an empty cell.
However, it doesnt hurt to report the issue.
Thanks for this great library. Hope you can continue this great work.
Best wishes, lagar84.