Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MvcRazorToPdf align content to bottom of page

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.

like image 933
user1534664 Avatar asked Jan 23 '26 14:01

user1534664


1 Answers

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>
like image 96
user1534664 Avatar answered Jan 25 '26 08:01

user1534664



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!