danfickle / danfickle/openhtmltopdf

Bug on text inside table when using margin-left

Open
#857 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.2k
Forks
423
PR merge metrics
No merged PRs in 30d

Description

Hello,

I found an issue when using margin-left on table.

Reproducer:
```

@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;
}

With margin-left on table


Label:
a a a a a a a a a a a a a a a a a a a a a a





Without margin-left on table



Label:
a a a a a a a a a a a a a a a a a a a a a a

```

This results in the pdf below (using sandbox or on my local project using version 1.0.10):

![image](https://user-images.githubusercontent.com/7378267/181621805-a51925bf-022d-44f7-9ba0-efe4f1757780.png)

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.