I am currently working on generating a paged pdf document from html using Openhtmltopdf. My main challenge is placing an image right at the edge of the page, outside of the @page margin. Despite my efforts, including playing with visibility, padding/margin, and negative margins of child elements, any content outside of the @page margin remains hidden under the margin.
The issue can be replicated in the Openhtmltopdf sandbox. Just by inserting this code snippet:
<html>
<head>
<style>
@page{
margin: 5cm;
border: solid;
}
</style>
</head>
<body>
<div style="font-size: 90px; position: absolute; top: 0cm; left: -1cm;">
Hello World!
</div>
</body>
</html>
into the sandbox found at , you will see the displayed result as shown below:
https://i.sstatic.net/51cDa.png
As you may have guessed, my problem lies in the fact that 'Hello world' is not visible outside the inner @page content section. Finding a way to override this rule and make the entire text visible would likely solve my issue. I have spent time meticulously formatting the existing content, so ideally, I would prefer to keep the current page margin definition without having to reformat the rest of the content. Ultimately, I simply need to place an image over the pdf document. Thank you in advance for any assistance!