Create empty linespace? #1279
Replies: 3 comments 2 replies
-
Hi @prainbow55 What makes you think that the FPDF.ln() method is deprecated? As a maintainer of
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Lucas
The documentation under fpdf.fpdf.FPDF.cell states twice that FPDF.ln is
deprecated:
- in the defn of "cell",
- and again under the param description for "ln".
https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.cell
Maybe meaning only in that particular context—as a param to "cell"? It may
enhance clarity if you were to add your second solution to the param
description, as nothing there led me to FPDF.set.
I see now that FPDF.ln has its own, independent entry further down the
list.
Thanks for your reply, I'm delighted to have my conscience cleared for
continuing to use FPDF.ln.
Paul
…On Wed, Oct 9, 2024 at 7:24 AM Lucas Cimon ***@***.***> wrote:
Hi @prainbow55 <https://github.com/prainbow55>
What makes you think that the FPDF.ln()
<https://pyfpdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.ln> method
is deprecated?
I'm really interested by the answer to this question, to figure if we
should fix this somewhere in our documentation.
As a maintainer of fpdf2, I recommend 2 solutions to introduce vertical
space in a document:
- use FPDF.ln()
<https://pyfpdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.ln>,
that is not deprecated at all
- simply set the Y position using FPDF.set_y()
<https://pyfpdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.set_y>,
FPDF.set_xy()
<https://pyfpdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.set_xy>
or even symply by setting pdf.y =.
—
Reply to this email directly, view it on GitHub
<#1279 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AX2NJTCN77EJAGV2OXGL6V3Z2UOABAVCNFSM6AAAAABPTCB7TSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBZGE4TGOA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Your first reply made me examine the documentation more carefully. Shortly
after I wrote back, the distinction clicked between the parameter and the
method, a distinction that you now underscore in your second reply. Thank
you.
Since I retired I've been learning to code for two years so far at the age
of 69, having spent my main career teaching in the humanities. Every day I
learn something new. I'm finding that documentation written by programmers
for other programmers often assumes a great deal of background knowledge
and doesn't always make those assumptions explicit for newcomers to the
field. May I say that yours is far more accessible than many.
Thanks for watching the boards and responding promptly.
…On Wed, Oct 9, 2024 at 9:18 AM Lucas Cimon ***@***.***> wrote:
The documentation under fpdf.fpdf.FPDF.cell states twice that FPDF.ln is
deprecated:
Oh OK! 🙂
I think that you mixed up 2 things:
- the ln argument of FPDF.cell() & FPDF.multi_cell() that is indeed
deprecated
- the FPDF.ln() method
Those are 2 very distinct things 🙂
—
Reply to this email directly, view it on GitHub
<#1279 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AX2NJTDEFVNHMJM5N36DN3LZ2U3KLAVCNFSM6AAAAABPTCB7TSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBZGMZTONI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Trying to place an empty linespace between a title and a table, to enhance readability and aesthetics..
The only thing I've found so far that works is the deprecated ln() method.
I've tried to use pdf.cell(..., , new_x="LMARGIN", new_y="NEXT"), likewise pdf.multi-cell(), inserting just about every combination of other parameters I can imagine. All results are either error messages or failure to make an empty space.
I've searched and searched the tutorials and the API ("empty line", "empty space", "newline", "blank space", "blank line", "ln", "ln()", etc.). The solution is simple, I'm sure of it, but I can't stumble across it.
Beta Was this translation helpful? Give feedback.
All reactions