
Here we will see what we need to do this course! Also we will create a Python Virtual Environment!
Here I will talk about Visual Studio Code Extensions for Python!
Here we will install a module named PyMuPDF that allow us to handle PDF files!
Here we will learn how to open a file with PyMuPDF and read the total number of pages.
keywords: fitz, open, dir, document.page_count.
Here we will read metadata from a PDF file, we will get the title, author, producer and table of content!
keywords: document.metadata, format, title, author, producer, document.get_toc.
Here we will read the text of each page and save it into txt files!
keywords: document.pages, page.number, page.get_text.
Here we will save into png files all the images found in all pages!
keywords: document.pages, page.get_images, xref, document.extract_image, Pixmap.
Here we will search and get (if present) all the url links found in the PDF document.
keywords: document.has_links, page.get_links.
Here we will learn how to take snapshots from each page and save into png files!
keywords: Matrix, page.get_pixmap, document.get_page_pixmap, __getitem__.
Here we will learn how to resize the PDF pages!
keywords: paper_rect, new_page, show_pdf_page, get_toc, set_toc.
Here we will learn how to rotate the pages of a PDF file.
keywords: rotation, set_rotation.
Here we will learn how to save part of a PDF file into another PDF file!
keywords: document.pages, document.page_count, insert_pdf.
Here we will learn how to join pages from two different PDF files into one PDF!
keywords: document.pages, document.page_count, insert_pdf, min.
Here we will learn how to make pages smaller and bigger!
keywords: page.rect, set_cropbox, set_mediabox, Page Boxes, MediaBox, CropBox, BleedBox, TrimBox & ArtBox.
Here we will learn how to add watermarks to our PDF files!
keywords: add_stamp_annot, page.rect, add_circle_annot, TextWriter, write_text, clean_contents.
Here we will use OCR (Optical Character Recognition) to extract text from our pdf!
keywords: easyocr, pytesseract, paddleocr, ocrmypdf, keras-ocr.
Welcome to Python PDF Handling from Beginner to Winner (PyMuPDF)! A great course on Manipulating PDF files!
Together we will learn, explore and have fun taking the most out of Python and several Python Modules to read/modify PDF documents.
Each session will be composed by several challenges that we will solve by exploring the available documentation, reading Python Modules source code and also debugging. By the end you will be able to unravel from situations where you cannot find help anywhere else! Sounds good right?
After taking the first session you will know how to:
Get the total number of pages of a PDF document;
Get its metadata, author, title, table of content;
Extract text from a PDF file and write it into a txt file;
Extract images from a PDF file and save it into a png file;
Read hyperlinks from a PDF document;
Take snapshots from pages and save them as png files;
Change pages paper size from A4 portrait, A4 landscape, and others;
Rotate the pages from a PDF file;
Split odd from even pages so it would be easier to print them;
Join together pages from several PDF files into a new PDF document;
Change pages visible area, crop the pages;
And add watermarks to PDF pages.
Sounds already fun right?
Do you know that we can have input forms in a PDF file? And that we can add JavaScript functionalities to a PDF file? Yeah we will do that too!
Join with me to this great challenge that is learning!