Answer the question
In order to leave comments, you need to log in
Pisa - xhtml2pdf div element sizes height, width not working
Hello, maybe someone has come across this.
I describe the style
<style>
@page {
margin: 0.5cm;
}
div#main_header{
background-color: yellow;
border: 1px solid black;
width: 100px;
}
</style>
<body>
I write
in the body<div id="main_header">Обычный текст</div>
<div>
takes the width of the sheet, and not 100px. Answer the question
In order to leave comments, you need to log in
Initially, I used xhtml2pdf, but it didn't render complex documents well (or it's just that my hands don't grow correctly), I switched to wkhtmltopdf , so far so good (the only minus needs to be set separately).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question