openhtmltopdf icon indicating copy to clipboard operation
openhtmltopdf copied to clipboard

problem w css transform rotate property

Open piotrpatrzek opened this issue 3 years ago • 1 comments

Hi, I have tables heder rotated using a style:

.rotated-name { transform: rotate(-75deg); }.

When rotated, the table headlines are scattered. See the attachment. I also attached an HTML that has been converted to PDF. TRACEABILITY_PDF2021-09-08T11_52_50.569.pdf traceability.html.zip

piotrpatrzek avatar Sep 09 '21 06:09 piotrpatrzek

By default the transform-origin is in the middle of the box, so this is what it rotates around. You may also need a small translateX. Could you try something like this:

.rotated-name {
  transform: translateX(1em) rotate(-75deg);
  transform-origin: left bottom;
}

danfickle avatar Sep 10 '21 11:09 danfickle