Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
97 views
in Technique[技术] by (71.8m points)

php - How to set a bottom margin in FPDF

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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])

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...