MvcRazorToPdf align content to bottom of page

1.1k views Asked by At

I am trying to get a footer in a generated pdf file. I am using this library https://github.com/andyhutch77/MvcRazorToPdf

Is there any way to get some of my content to the bottom of the page? Unfortunately pdf does not respond to position:absolute; bottom:0px; or margin-bottom.

The page shows an unknown amount of records on the page, so I cannot do it statically.

1

There are 1 answers

4
user1534664 On BEST ANSWER

I found a way to solve this problem. It's not very neat, but I doubt there are other ways since MvcRazorToPdf does not support the margin and position styles.

<table id="wrapper" style="height:100%;">
    <tr>
        <td valign="top">
            Put your site content here.
        </td>
    </tr>
    <tr>
        <td valign="bottom">
            Put your footer here.
        </td>
    </tr>
</table>