Just as I ask in the title, how can I draw a line over all pages using fpdf?
I tried giving the line a height of 9000, but this only gave a line to the full first page, but not on any other pages.
Anyone knows how I can solve this? Thanks!
In FPDF, the header
method is called automatically when a new page is created. From the API:
This method is used to render the page header. It is automatically called by AddPage() and should not be called directly by the application. The implementation in FPDF is empty, so you have to subclass it and override the method if you want a specific processing.
Here's the steps you take:
header
method in your extensionheader
method.This is the simplest solution. No keeping track of whenever a new page is added. FPDF does it automatically, so build off of their API to achieve your goal.