.netpdffooterrazorgenerator

RazorGenerator add footer on every pdf page


I am using RazorGenerator in .NET to convert HTML pages to PDF files. This works great! I ran into a problem. When you use a table in your HTML with a thead it will repeat this thead on every PDF page. This is great, but now I would like to add a footer on every page as well. With a footer I mean something like you see in Word: "Page 1 of 6" or a date.


Solution

  • The solution is to use <tfood> this will repeat the HTML inside of it on every page. Example:

    <tfood>
      <tr>
        <td>
         This text will appear on every page!
        </td>
      </tr>
    </tfood>