Open
Description
To generate PDF from HTML I am using com.vladsch.flexmark.pdf.converter.PdfConverterExtension class.
If for example my html div is landscape, it will go to second page and leave the first page empty and portrait orientation. I am not sure on how to handle this kind of scenario.
Here I attached the HTML sample and also the PDF generated.
<!DOCTYPE html><html><head><meta charset="UTF-8">
<style>
@page landscapeA4 {
size: A4 landscape;
}
.landscape_div{
page: landscapeA4;
height:100%;
width:100%;
}
</style></head><body>
<div class="landscape_div">
<h1>Heading</h1>
<hr />
<p>paragraph text lazy continuation</p>
<ul>
<li>list item
<blockquote>
<p>block quote lazy continuation</p>
</blockquote>
</li>
</ul>
<p>~~~info with uneven indent with uneven indent indented code ~~~</p>
<pre><code> with uneven indent
with uneven indent
indented code
</code></pre>
<ol>
<li>numbered item 1</li>
<li>numbered item 2</li>
<li>numbered item 3
<ul>
<li>bullet item 1</li>
<li>bullet item 2</li>
<li>bullet item 3
<ol>
<li>numbered sub-item 1</li>
<li>numbered sub-item 2</li>
<li>numbered sub-item 3</li>
</ol>
</li>
</ul>
<p>~~~info with uneven indent with uneven indent indented code ~~~</p>
<pre><code> with uneven indent
with uneven indent
indented code
</code></pre>
</li>
</ol>
</div>
</body></html>