Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Python PDF Generation: From Beginner to Winner (ReportLab)
Rating: 4.6 out of 5(156 ratings)
1,015 students

Python PDF Generation: From Beginner to Winner (ReportLab)

Generate Dynamically PDF files using Python and ReportLab
Created byHugo Ferro
Last updated 8/2025
English

What you'll learn

  • Generate dynamically PDF files with Python
  • Practical use cases with a hands-on approach
  • Real Life examples with step by step explanation

Course content

2 sections21 lectures8h 33m total length
  • Introduction7:03

    Here I talk about who am I and what you can expect from this course. Also pay attention, this course is not completed yet, I will add more resources and lectures over time. Don't worry It will be always with enough material for you to make something from zero to the end!

  • Part 1 - Build the main structure37:34

    After this you will be able to:

    • Create a PDF file with reportlab

    • Set PDF title

    • Create a reportlab Table

    • Understand how to configure Table widths and heights

    • Apply basic styles to a Table

    • Structure the code for the final PDF

  • ReportLab Tables
  • Part 2 - Make the footer15:21

    After this you will be able to:

    • Add background color to a Table cell

    • Center text horizontally and vertically in a Table cell

    • Change text color

    • Colors from Hexadecimal code

  • ReportLab Table Styles
  • Part 3 - Make the header24:00

    After this you will be able to:

    • Add images to PDF Table cell

    • Adjust image size to be proportional

    • Center image horizontally and vertically in a Table cell

    • Do a trick to put text over an image in a Table cell

  • ReportLab Tables, Table Styles and Images
  • Part 4 - Build body structure24:42

    After this you will be able to:

    • Create inner tables

    • Add a border below a Table cell

    • Select multiple Table cells

    • Increase Table cell text font size

  • ReportLab Tables and Table Styles
  • Part 5 - Make about section18:31

    After this you will be able to:

    • Create Paragraphs

    • Add style to a Paragraph

    • Increase font size of a Paragraph

    • Add space between Paragraphs

  • ReportLab Paragraphs
  • Part 6 - Make description section10:26

    After this you will be able to:

    • Add a list of Paragraphs to a Table cell

    • Do basic Paragraph style using HTML like tags, i.e., bold, italic and underline

    • Change Paragraph text color with a ParagraphStyle object

    • Change Paragraph text color with HTML like tags

  • ReportLab Paragraph and ParagraphStyle
  • Part 7 - Make contacts section29:43

    After this you will be able to:

    • Know the advantages of a Paragraph vs literal string in a Table cell

    • Load data from a txt file to a Table

  • ReportLab Paragraphs
  • ReportLab Table Styles
  • Part 8 - Make prices list section28:33

    After this you will be able to:

    • Change font name of a Paragraph using ParagraphStyle object

    • Load data from a csv file to a Table

    • Know the difference between csv and xlsx files

    • Alternate background color of Table rows

  • ReportLab Tables, Table Styles and Paragraphs
  • Exercise 1 - Add shadow effect to text!10:56

    Palms Hotel managers liked a lot our previous job! So they asked us to make a shadow effect to a specific text!

  • ReportLab Table Styles
  • Exercise 2 - Add Arabic text!8:43

    Palms Hotel managers asked us to add a text in Arabic!!! You will learn how to register a True Type Font aka ttf!

  • ReportLab Supported Fonts
  • Exercise 3 - Register a Font Family15:17

    Palms Hotel managers asked us to change the font used in two paragraphs. The new font have several ttf files, for normal, bold, italic and bold italic!! You will learn how to register a font family and take advantage of it in a Paragraph.

  • Exercise 4 - Add Five Stars!37:23

    Here you will learn how to draw:

    • a rectangle;

    • a triangle;

    • a star.

    For that you will use the ReportLab classes: Drawing, Polygon, Group and Rect.

  • Exercise 5 - FAQs38:45

    Here I decided to answer some frequent asked questions, you will see how to:

    • Create a New Page;

    • Get the Page Number;

    • Set the Page in Landscape;

    • Add Outlines to your document;

    • Protect it with Password;

    • Encrypt your PDF.

  • Exercise 6 - Debug ReportLab Code54:37

    In this lecture you will learn how to:

    • Configure Visual Studio Code for Debugging;

    • Basics of how Debug works;

    • Find specific ReportLab Code;

    • Use PowerShell to search for files that contains a specific string;

    • And the most important one! How to think.


  • Exercise 7 - Django App1:23:50

    In this lecture you will learn how to:

    • Refactor the existing code to extract a simple and useful interface;

    • Install Django;

    • See Django version;

    • Create a Django Project;

    • Create a Django Application (very simple "Hello World");

    • Create an HTML form and submit data to a Django View;

    • Adapt ReportLab code to run in Django;

    • Make Django View return a PDF document (that will be downloaded).

Requirements

  • Eager to learn!
  • Knowledge about basics of Python 3

Description

This course is a hands on, is very practical, is the result of my previous works for clients of mine and also videos that I made for my youtube channel. I will propose several PDF documents, I will try to make them look professional and I will teach you on how to make them step by step in detail. Every PDF takes me like 2 months to prepare, to structure in a way you can digest and practice what you learned several times, be patient because I will update this course frequently!

You will learn:

  • How to change text font size;

  • Change text color;

  • Use True Type Fonts;

  • How to load images;

  • Create tables;

  • Create paragraphs;

  • Make watermarks;

  • Rotate text;

  • Rotate images;

  • Protect your PDF files with passwords;

  • Prevent people from printing your PDF files;

  • Insert radio buttons;

  • Insert check boxes;

  • Insert drop down lists;

  • Insert text fields;

  • Add javascript to your PDF documents;

  • Export PDF files within a Django App;

  • and more!

You will not only learn about ReportLab! Also you will learn how to think, how to structure your code, how make your code pretty and easy for everyone to understand your work, because at the end of the day these skills are the ones that make companies want you!


Hope you enjoy my work, I will give my best to make you a winner :)

Who this course is for:

  • People who need to generate PDF files dynamically
  • Beginner Python developers
  • Data Scientists
  • Data Analysts