Hey! thanks alot for taking your time and making this video. I was struggling for quit a time to understand how to create pdf file and there were not much good tutorials available . but i understood after viewing ur video.
@SajidAli-wy1zs3 жыл бұрын
I have seen your heading and subscribed it. Love from Bangladesh.
@jjpratt26992 жыл бұрын
Great content, hoping you could make a video on creating a pdf from Excel with Pandas using dataframes 10 columns wide. Some of the columns have text that is wider than the column and needs to be wrapped in the cell. Excel has color coding in some of the cells that need to be transfered to the pdf. Looking on how to accomplish this. Would make a great follow up video to this.
@alanpounds2092 Жыл бұрын
I've enjoyed and learned some very important coding on creating PDF's using Python. I would love it if you would teach on using CSV data that would import it into areas of the PDF document/form or your recommended links to how this is done. Thanks
@bobsimon1554 Жыл бұрын
thanks for this tutorial. how do i link a variable from a form field to this pdf maker ? what is the synthax. ty
@MdMozammelHossain2 жыл бұрын
The output name can I change with some variable, I mean there will be date and time included in output name of pdf.?
@abhishes2 жыл бұрын
Is there any way to add tooltips to a PDF Cell? so once someone brings their mouse over my cell, they can see some extra information?
@MURALIKRISHNAhai3 жыл бұрын
Hi, Could you please explain how to insert links In an already existing PDF file its like I have a large ine single PDF (A merged pdf with multiple individual pdf files)I would like to make an INDEX with links or How to add links internally to the large PDF file
@ChartExplorers3 жыл бұрын
Check out this article here: realpython.com/creating-modifying-pdf/#concatenating-and-merging-pdfs I'll answer in more depth when I get a chance!
@ChartExplorers3 жыл бұрын
Hi Murali, I've been working on how to insert links into already existing PDFs, but am having a difficult time getting tit to work properly (pythonhosted.org/PyPDF2/PdfFileWriter.html). I am going to to keep trying to figure this out. I have a couple more ideas, but I won't be able to get the linking video up as soon as I had hoped.
@mohammed-hananothman55589 ай бұрын
Great video Would love it if you could add in depth videos of layout and positioning like 2 column and 3 layout column etc. Also would love to see you make a video on "Creating a resume pdf using python" Great work overall. loved it. 👍
@MdMozammelHossain2 жыл бұрын
I've one more question, how can I get data from sqlite3 database table to pdf,?
@capincrunch11843 жыл бұрын
Another question is there a way you could create a GUI in python to allow users to select anywhere in their computer to save a copy of the pdf instead of setting the location standard
@ChartExplorers3 жыл бұрын
Hi Kevin, yes there is! tkinter is probably the easiest GUI library to get started with. (ps I'll send you a link to my github in just a second with how to add a table. Sadly it's not possible to use python natively to add a table - that would have been too easy! - so we actually have to use HTML).
@capincrunch11843 жыл бұрын
@@ChartExplorers thank you
@capincrunch11843 жыл бұрын
@@ChartExplorers just really wanted to see if I could create a GUI so I could allow any user to choose the file destination and file name but I’m having trouble setting it up as an input
@ChartExplorers3 жыл бұрын
@@capincrunch1184 That would be awesome. GUIs are fun because you can share them with other (no programing) friends.
@namastevis2 жыл бұрын
Awesome content, exactly what I was looking to learn and use. Where can I find part 5 to automate the creation of reports and invoices?
@jovensaventureiros2 жыл бұрын
Hello, before anything I wanna to thank u for this videos, helped me a lot. I wanna ask u if u know how can I fix some error. I'm saving some form in a database and creating PDFs with this data, but the multi_cell attribute isn't work as I expect, it's not breaking lines. Have u have some idea how can I fix this? Again, thx for this videos and congratulations to your channel.
@ayushkathpalia89823 жыл бұрын
hey ,amazing video . i have html and css written file and wanted to convert it to pdf . is it possible with fpdf2 lib?
@ChartExplorers3 жыл бұрын
FPDF2 does support HTML, but sadly not CSS 😥. You can find more details here pyfpdf.github.io/fpdf2/HTML.html
@Achiesamablog3 жыл бұрын
Does fpdf2 have this cell method?
@sheen8270 Жыл бұрын
Thank you for these video tutorials! I have run into an issue when it comes to creating the internal links to chapters 1 and 2. for now, under the section where links are created, I had to add the page numbers like this: ch1_link = pdf.add_link(page=2) ch2_link = pdf.add_link(page=6) Even if I copy part_4.py exactly I was getting the following error: File "H:\python\pypdf\.venv\Lib\site-packages\fpdf\fpdf.py", line 2093, in link raise ValueError( ValueError: Cannot insert link 1 with no page number assigned If I figure out a way to work around this, I'll update but for now I wanted to mention in case anyone else runs into the same issue.
@rhysbennett16673 жыл бұрын
Thanks for the continued videos, the are helping me out so much!
@ChartExplorers3 жыл бұрын
Thanks so much! I'm glad they have been helpful :D
@capincrunch11843 жыл бұрын
how would i go about creating a table or lines in a pdf
@ChartExplorers3 жыл бұрын
What format is your data in? List of lists, dictionary, pandas dataframe, numpy array...
@capincrunch11843 жыл бұрын
@@ChartExplorers numpy array
@capincrunch11843 жыл бұрын
@@ChartExplorers actually list
@ChartExplorers3 жыл бұрын
@@capincrunch1184 Here is a github link github.com/bvalgard/create-pdf-with-python-fpdf2/blob/main/table.py that will take you to an example py file. I was hoping we could use tabulate to create a table, but that is not supported in FPDF2. So we have to create our table with HTML which is much more work. I'm going to keep working on this and then one day I'll make a video explanation on this. There are a lot of tutorials online on how to make a HTML table. You can also ask me and I'll do my best to help out.
@capincrunch11843 жыл бұрын
@@ChartExplorers had no idea you could write code like that in python
@adamfatyga79772 жыл бұрын
How to create easy table on pdf? I dont need 'fireworks', just sortet data.
@ElinLiu08233 жыл бұрын
That was a pretty good tourial and i am using what you teached to help my uncle to make automatically Enneagram report for him. Based with Plotly Express and Selenium Scraping Tools.
@matiasr13733 жыл бұрын
Thanks for the videos!
@gambu48102 жыл бұрын
I love it
@lilicrashes3 жыл бұрын
This is great!! can you do even more expansion? Like auto printing reports or charts from excel or dataframes?
@ChartExplorers3 жыл бұрын
Hi Acr Rca, thanks and thanks for the ideas. I've added them to my list of video topics :)
@capincrunch11843 жыл бұрын
Thank you for the videos
@capincrunch11843 жыл бұрын
I have a question about setting where to save the pdf
@ChartExplorers3 жыл бұрын
@@capincrunch1184 Are you wondering how to save the pdf somewhere else other than the directory that your .py file is in?
@capincrunch11843 жыл бұрын
@@ChartExplorers yes
@ChartExplorers3 жыл бұрын
@@capincrunch1184 what you can do is pass in the path to where you want your file to be saved to pdf.output For example: pdf.output(r'C:\Users\bvalg\Documents\Pdf'Folder\my_pdf.pdf) here the r infront of the file path string indicates it's a raw string which will strip any specail values a character might have (this is particularly important for Windows users where file paths contain backslashes which have a special value to escape a character)
@capincrunch11843 жыл бұрын
@@ChartExplorers oh ok thank you I’ll try it out thanks for the help and the videos, the videos are incredible help
@fernandalopez31493 жыл бұрын
Amazing tutorial! I have one question, how can I add an image on the body of the PDF?
@ChartExplorers3 жыл бұрын
Thanks! If you want an image in the body of the pdf then use pdf.add_page() to create a new page followed by pdf.image('image_location_and_name.png'). That will place the image on the page you just created.
@fernandalopez31493 жыл бұрын
@@ChartExplorers Thank you!
@Pandimoori_krish3 жыл бұрын
Hi I have excel file in that second column text i mean address dono ,mobile no, pincode so how to retrive only mobile number using pandas dataframe
@ChartExplorers3 жыл бұрын
Could you give me an example of what the column looks like? Is it a list [address, phone number, pincode], a string 'address, phone number, pincode', or something else? Is each field separated by a comma, white space, semi-colon? Do the phone numbers all follow the same pattern i.e., (555) 867-5309?
@ChartExplorers3 жыл бұрын
@hi -- (email removed)
@Pandimoori_krish3 жыл бұрын
@@ChartExplorers Thank you
@ChartExplorers3 жыл бұрын
@@Pandimoori_krish I just responded to your email.
@Pandimoori_krish3 жыл бұрын
@@ChartExplorers Thank you so much
@sparqllord88313 жыл бұрын
You really need to include something about adding images. A PDF without images is like a soda without sugar. Everybody talks about images in header and footer, but the most interesting is floating images in the body of the document. The usually problem is that you want to include from 1 to X pictures without any clue about X. Only that you want to have them like 2 and 2 fitted horizontally at specific places within the text.
@ChartExplorers3 жыл бұрын
hmmmm, soda without sugar! Yuck :p Good analogy. I see where you are coming from. I should make a more in depth video on adding x number of images to a pdf and image placement. in the body of the pdf. Do you have any specific needs / suggestions for examples I could base the video off of? Have you seen Kieth's pdf video? He uses pyfpdf (fpdf2 is based off of pyfpdf so the syntax is very similar) kzbin.info/www/bejne/i56xY5KIabB4nZo Is this the type of pdf you talking about? I think it would be beneficial to have an image and text side by side.
@sparqllord88313 жыл бұрын
@@ChartExplorers Good suggestion - but have already seen it, thanks. My particular case is not a general one so it's not a good example. A more relatable problem would be having a database with a lot of information about both companies and their subsidiaries. The task is to generate a presentation of the hole family - one PDF for each company and its subsidiaries. So first list up the basics about the mother company - name, address, etc - then include some pictures (paths are found in the database) followed by some more text and different kind of images. Then under subsections in the PDF present the same kind of information about each of the subsidiaries. The amount of information about each company varies so everything need to be dynamic.
@ChartExplorers3 жыл бұрын
@@sparqllord8831 thanks for the example. Yes, this is much more complex than any tutorial I've seen on KZbin. It sounds like a fun problem / project. Let me do some digging and practicing to see what I can come up with. If I can come up with anything worth sharing I'll send you a link to github with some possible solutions. I'll also make a video on it, but videos take a while to make. Do you have a deadline?
@sparqllord88313 жыл бұрын
@@ChartExplorers @Chart Explorers Deadline is as always tomorrow, but I'll find a workaround. After doing everything in SAS for years I'm new to Python. Hope to do lots of fun stuff in the future and PDFs are always in demand - so I'm interested anyhow. Thanks a lot for great and fast response.
@ChartExplorers3 жыл бұрын
@@sparqllord8831 Isn't that how it always is!! I'll get working on some type of a solution so if there is a next time you'll be ready to automate the process :)