-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
Description
Hi all, thanks for creating a great library!
I'm encountering an issue when providing a custom footerHtmlString which contains an image. I'd like this image to be positioned flush to the bottom-right edge of the document. I've tried a lot of documentOptions, including configuring all margins to 0, however the image never gets positioned flush to the bottom-right edge. There seems to be some kind of margin which prevents this. I'm noticing the same on the left side of the document.
These are my current documentOptions:
const options = {
pageNumber: true,
header: true,
footer: true,
font: 'Arial',
fontSize: 22,
heading: customHeadingOptions,
margins: {
top: '3.44cm',
bottom: '2.73cm',
left: '2.2cm',
right: '1.5cm',
footer: 0,
},
};
This is my current footerHtmlString:
const footerHTML = `
<div style="
margin: 0;
padding: 0;
">
<img
src="data:image/jpeg;base64,${footerImageTransparent}"
style="
width: 600px;
height: 133px;
display: block;
margin: 0;
padding: 0;
"
/>
<div style="position:absolute; left:30px; bottom:30px; font-size:10px;">
${version}
</div>
</div>
`;
Would anybody be able to provide some guidance/insight as to why this is the case?
Many thanks in advance!
Reactions are currently unavailable