3

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.

hutchonoid
  • 32,982
  • 15
  • 99
  • 104
user1534664
  • 3,258
  • 8
  • 40
  • 66

1 Answers1

3

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>
user1534664
  • 3,258
  • 8
  • 40
  • 66