Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line spacing for a long line that is displayed in several lines. #1213

Closed
rfc-st opened this issue Jun 22, 2024 · 5 comments
Closed

Line spacing for a long line that is displayed in several lines. #1213

rfc-st opened this issue Jun 22, 2024 · 5 comments

Comments

@rfc-st
Copy link

rfc-st commented Jun 22, 2024

Hello!,

First of all, thank you for this library ^^.

Is there any parameter, or configuration option, to define the spacing for a long line of text that is displayed in several lines?.

As you can see in the following image (https://imgur.com/a/y8X088R), the fourth line starting with "Nota : " is displayed in two lines ... without any vertical spacing between them; both lines are displayed too close together.

Thanks!

@andersonhc
Copy link
Collaborator

Hello!,

First of all, thank you for this library ^^.

Is there any parameter, or configuration option, to define the spacing for a long line of text that is displayed in several lines?.

As you can see in the following image (https://imgur.com/a/y8X088R), the fourth line starting with "Nota : " is displayed in two lines ... without any vertical spacing between them; both lines are displayed too close together.

Thanks!

You can set the spacing with the parameter "h". The default value of this parameter is the font size in pt.

@Lucas-C
Copy link
Member

Lucas-C commented Jun 24, 2024

Hi @rfc-st, and thank you for your kind words!

As a complementary answer, if you are using the multi_cell() method, you can also play with the max_line_height parameter.

Do you have other questions @rfc-st?
Tell us if we can close this issue, or else we'll try to help you further 🙂

@Lucas-C
Copy link
Member

Lucas-C commented Jun 24, 2024

Also, a side question: do you see a place in our documentation where we should document this better? 😅

@rfc-st
Copy link
Author

rfc-st commented Jun 25, 2024

Hello,

Thanks to both of you for the advices!: I will try them this weekend. And about the documentation, if you don't mind leaving this issue open for a few more days, I will check it thoroughly. I'm sure your advice is indicated.

Best regards,

@rfc-st
Copy link
Author

rfc-st commented Jun 28, 2024

Hello,

I have succeeded, by using YPos! (https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.YPos):

https://imgur.com/a/DaPtwtq

Thanks for your advices and for this great library!. Btw, i am using it on https://github.com/rfc-st/humble/ ... In case you would like to include a mention in https://py-pdf.github.io/fpdf2/#community :)

Regards,

@rfc-st rfc-st closed this as completed Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants