How to set a bottom margin in FPDF

SquareCat picture SquareCat · Sep 24, 2012 · Viewed 35.6k times · Source

I've taken a dive into FPDF lately and something that i don't seem to understand is - why is there no way to set a bottom margin? There are functions for setting margins from the top, left and right, but not from the bottom.

I assume now that i misunderstand something basic and conceptual about how FPDF works yet i got no clue on what that could possibly be.

So to cut it down:

Is it possible to define a fixed bottom margin in FPDF?

Answer

SquareCat picture SquareCat · Sep 24, 2012

I just found the solution - the bottom margin is simply left out of predefinition because it is part of the page break calculation process. Therefore, setting a bottom margin in itself is not possible, but it can be done using

SetAutoPageBreak(boolean auto, [float margin])