PejmanNik/puppeteer-report

Is it possible to have the content of the pdf overlap the footer?

PritamSangani opened this issue · 3 comments

Hi! Thank you for developing this awesome library - it makes it much easier to include a footer for puppeteer pdf generation!

I was wondering if it was possible, either via options or CSS, to have the footer and content overlap, with the footer appearing underneath the content?

I am looking to achieve something like this:
Screenshot 2021-07-31 at 20 49 13

With the graphic being part of the footer appearing on all pages and the box with the grey border being part of the page. Not all pages will have the content overlapping the footer.

I tried something similar using all kinds of CSS trickery - position: absolute, position: fixed, viewport units etc. and couldn't get anywhere. I think the way it works under the hood means there's essentially 3 <html> elements which sort of get concatenated together, so their contents are completely unrelated during the build, which means you'll struggle with any overlapping.

I could be wrong, but I gave up in the end.

@martynhoyer is right you can't do it. but maybe we can play some hack if you have static content to overlap like the image. please prepare a sample HTML page I will try it.

The current lib uses a hack to make it possible to have a header and footer and there is not much room to customize but I'm working on a new way that will resolve this issue and open a way to customize the render process. you can check the progress in #12