Create PDF with Python | Part 1

preview_player
Показать описание
How to create a pdf with python using the simple library FPDF2. This is part 1 of a 4 part series where we go over how to create a pdf with Python and eventually automate the creation of reports and invoices.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

$15 off Annual Dataquest subscription
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Part 2

Did you find this video helpful? Consider subscribing for weekly tips, tricks, and tutorials.

Join my Discord Server

Check out the official tutorial and documentation that these videos are based on:

Github

0:00 Intro
0:49 Setup
1:39 Library Installation
1:59 Imports
2:08 Create PDF Object
3:08 Add PDF Page
3:19 Specify Font
4:08 Add Text
5:05 Create PDF
5:52 Adding Additional Text
6:09 Permission Error
6:32 Text Placement
8:55 Overview
9:49 Up Next...
Рекомендации по теме
Комментарии
Автор

Soon your channel will soar. Not many speak and explain as structured and clear as you do.

joachimguth
Автор

Just stumbeld over your chanal. Awesome videos. Just wanna say thank you for your great work. I highly appreciate what you do and how you do it. The way you explain everything is super clear. Again. Keep up the great work.

Michael-value
Автор

Great Video … Thank you so very much ❤❤❤

brpawankumariyengar
Автор

If you use explorer preview, you can see the .pdf update dynamically, without having to close and reopen the .prf viewer

stillchris
Автор

Thank you so much. With your help I have automated reports on my website❤️

alpheim
Автор

This type of video. I have been searching since a month, that is very helpful viedo, i like that viedo and also have learnt my things, Ty

Aditya-qbto
Автор

Hey Chart Explorers, nice to meet you! I just found your channel and subscribed, love what you're doing!

I like how clear and detailed your explanations are as well as the depth of knowledge you have surrounding the topic! Since I run a tech education channel as well, I love to see fellow Content Creators sharing, educating, and inspiring a large global audience. I wish you the best of luck on your YouTube Journey, can't wait to see you succeed! Your content really stands out and you've put so much thought into your videos!

Cheers, happy holidays, and keep up the great work ;)

empowercode
Автор

Thanks a lot sir. This is the course I was waiting for

code-to-learn
Автор

This is exactly what I've been looking for, thank you so much!!!

zdxwlpo
Автор

Thanks for the video. While trying to move the second cell to next line using the 'ln' parameter, I am getting the following warning:

"DeprecationWarning: The parameter "ln" is deprecated. Instead of ln=True use new_x=XPos.LMARGIN, new_y=YPos.NEXT."

Using the recommended parameters are also giving errors as XPos and YPos have not been defined.

However, according to the documentation (Tuto 1 - Minimal Example), the following paramters can be used: new_x="LMARGIN", new_y="NEXT". This worked for me.


So, the code at line 21 at time 7:40 becomes:

pdf.cell(120, 10, 'Hello World!', new_x="LMARGIN", new_y="NEXT")

zunaidhassan
Автор

The "ln" method, discussed about the 7:30 mark, is deprecated. The replacement method isn't particularly appealing.

runner
Автор

Top!!!! Straight to the topic! Thanks!

MilesAhead
Автор

Thanks....well laid out start.
Waiting for the bit where I can save my dataframes to pdf

mrmuranga
Автор

Very nice video, I loved the way you comment and explain every argument of the function, it helps a lot if you want to your own thing.
There is one question I have though. I noticed that when I draw a border around my cell, the text will overflow beyond the border. Does that mean that the text will not wrap inside the cell size and keep going beyond it if it doesn't have enough space ?

Thanks !

simaobonvalot
Автор

Very helpfull video. FPDF docs are not that good. It would take me a lot of time to understand it fast. I have only one day left in my project. You made it very intuitive.

subhadeepchowdhury
Автор

Can you please add the link to the files you mention in the video? Thank you

StraniSimo
Автор

Hello,
Very nice job and many thanks man for sharing knowledge.
I have a question sir : How can I change pdf file from A4 to tabloid ?

mohamedbouamara
Автор

sir please do the coding slowly and show it on white screen

Tamilnanba
Автор

How to add a template image PNG in the background of the PDF file? Wich folder choose

coloradojon
Автор

hi, i have one question, how to add button and when i press it, it will reture to catalog?

yanghaitao