Pages

Topics

Tools

↑↓navigate↵openescclose

Python guides

Every published Python guide, newest first, with practical examples you can copy into your own project.

3,965 guides across 14 topics

Topics

Latest Python guides

Diagram comparing ReportLab Canvas and Platypus approaches to PDF generation.
Python

Python ReportLab Canvas vs Platypus

Compare ReportLab's Canvas and Platypus APIs for Python PDF generation: imperative drawing vs. automatic document flow, and how to choose the right approach for your project.

ReportLabPDF generationCanvas APIPlatypus
A Python script icon on the left and a stylized PDF document on the right containing a text paragraph, a small table, and an image placeholder, illustrating ReportLab PDF generation.
Python

Python ReportLab: Create PDFs with Text, Tables, and Images

Learn how to generate PDFs with Python ReportLab: add text with Paragraph, build tables with Table and TableStyle, insert images, and control layout with flowables.

ReportLabPDF generationPythonTables
Side-by-side comparison of pymupdf and pypdf Python libraries showing a PDF document split into two processing paths.
Python

python pymupdf vs pypdf: Choosing the Right PDF Library

python pymupdf vs pypdf: A practical comparison of pymupdf and pypdf for Python developers, covering text extraction, page manipulation, rendering, and performance tra...

pymupdfpypdfPDF processingPython libraries
Illustration of PDF pages being merged, split, and redacted with a Python code snippet in the background.
Python

Merge, Split, Edit, and Redact PDFs with Python PyMuPDF

Learn to merge, split, edit, and redact PDFs with Python PyMuPDF. Practical code examples cover inserting pages, splitting ranges, adding text, and applying permanent redactions.

PyMuPDFPDF manipulationPDF redactionPDF merge
A PDF page transforming into a PNG image file, illustrating PyMuPDF page-to-image conversion.
Python

Convert PDF Pages to Images with PyMuPDF

Use PyMuPDF to render PDF pages as PNG or JPEG images in Python. Set DPI and zoom, choose formats, and manage memory during batch conversion.

PyMuPDFPDF processingfitzimage conversion
A stylized PDF document with text lines and image icons being extracted into separate elements, representing PyMuPDF text and image extraction in Python.
Python

Extract Text and Images from PDF with PyMuPDF

Learn how to extract text and images from PDF files using PyMuPDF in Python. Includes code examples for text blocks, embedded images, and common edge cases.

PyMuPDFPDF extractiontext extractionimage extraction
Illustration of a PDF document with a watermark overlay and metadata tags, representing Python pypdf operations.
Python

Python pypdf Metadata and Watermarks

Read and write PDF metadata and add watermarks with Python pypdf. Includes code for page positioning, rotated pages, and error handling.

pypdfPDF metadatawatermarkingPDF manipulation
A PDF document with a padlock icon representing encryption and decryption using Python pypdf.
Python

Encrypt and Decrypt PDFs with Python pypdf

Learn how to add user and owner passwords, set PDF permissions, decrypt protected files, and remove encryption using the Python pypdf library.

pypdfPDF encryptionPDF decryptionpassword protection
Illustration of a Python script manipulating PDF pages with pypdf, showing text extraction, merging, splitting, and rotation icons.
Python

Python pypdf: Extract Text, Merge, Split, and Rotate PDFs

Learn how to use the Python pypdf library to extract text, merge PDFs, split pages, and rotate pages. Includes practical examples and memory considerations.

pypdfPDF manipulationtext extractionPDF merging
Python Markdown document converting to a styled HTML table with syntax-highlighted code blocks.
Python

Python Markdown Tables and Code Highlighting Extensions

Enable tables, fenced code blocks, and Pygments-based syntax highlighting in Python-Markdown, with configuration examples and common pitfalls.

pythonmarkdownsyntax-highlightingtables