PDFReactor - Footer shows right after end of content, instead of the bottom of the page

968 Views Asked by At

I have set my footer as a running element. The HTML content of the footer is set at the end of the document, thus making the footer show only on the last page of the document (which is what I want).

<!-- DTD declaration --> 
<html>
<!-- head -->
<body>
    <!-- My content -->
    <footer>
        <!-- footer content -->
    </footer>
</body>
</html>

The problem is that the footer shows directly under the content, instead of its specified position:

footer {
    width: auto;
    margin: 0 auto;
    position: running(footerIdentifier);
}

@page {
    @bottom-center {
            content: element(footerIdentifier);
        }
}

I have tried the classic approach, but I need to calculate the push block dynamically depending on too much different content to get a perfect position for the footer everytime.

Shouldn't this code make the footer appear at the bottom center of the page?

I have been browsing the manual (HTML)(PDF) specifically for the Running Elements for a while and I can't seem to find my mistake.

1

There are 1 best solutions below

0
On

I still didn't find why PDF Reactor won't behave like it should, but in the meantime I used the widely-known regular CSS way:

footer {
    position:absolute;
    bottom:0;
}