ReportLab - PDF Processing with Python
ReportLab - PDF Processing with Python
$14.99
Minimum
$19.99
Suggested
ReportLab - PDF Processing with Python

This book is 100% complete

Completed on 2018-06-13

About the Book

Note: This book is currently in EARLY ACCESS mode. It will be finished in June 2018. I will be updating it continuously until then.

ReportLab is the primary package that most Python developers use for creating PDFs programmatically. This book will take a deep dive into this package and teach you how to use this versatile library.

This book will be split up into 2 parts:

  • Section I - An Intro to ReportLab
  • Section II - Turning Data Into Reports

Table of Contents

  • Introduction
    • About the Author
    • Conventions
    • Setting up & Activating a Virtual Environment
    • Dependencies
    • Installation
    • Configuration
    • Reader Feedback
    • Errata
    • Code Examples
  • Part I - The ReportLab Toolkit
  • Chapter 1 - Getting Started with Reportlab
    • The Canvas Object
    • Canvas Methods
    • Using Colors in ReportLab
    • Adding a Photo
    • The textobject
    • Create a Page Break
    • Canvas Orientation (Portrait vs. Landscape)
    • Other methods
    • A Simple Sample Application
    • Wrapping Up
  • Chapter 2 - ReportLab and Fonts
    • Unicode / UTF8 is the Default
    • The Standard Fonts
    • Other Type-1 Fonts
    • TrueType Fonts
    • Asian Fonts
    • Switching Between Fonts
    • Wrapping Up
  • Chapter 3 - Intro to Page Layout
    • The Basics of PLATYPUS
    • Changing Fixed Elements Across Pages
    • Flowable Methods
    • Frame Basics
    • Templates
    • Flowable Orientation (Portrait vs. Landscape)
    • Wrapping Up
  • Chapter 4 - Paragraphs
    • Paragraph Styles
    • Paragraph Markup Tags
    • The Outermost Markup Tags
    • Using Intra-Paragraph Markup
    • Working with Fonts
    • Superscripts & Subscripts
    • Inserting Inline Images
    • Numbering Paragraphs / Sections
    • Bullets
    • Wrapping Up
  • Chapter 5 - Tables
    • The Table’s Methods
    • Applying Style to Your Table
    • Cell Formatting
    • Changing Fonts in Tables
    • Line Commands
    • Cell Alignment
    • Alternating Background Colors
    • Putting Paragraphs in Your Cells
    • Adding Images to Cells
    • Spanning
    • Wrapping Up
  • Chapter 6 - Other Flowables
    • Preformatted
    • XPreformatted
    • The Image Flowable
    • The Spacer Flowable
    • PageBreak
    • CondPageBreak
    • KeepTogether
    • How to Add a Table of Contents
    • SimpleIndex
    • ListFlowable / ListItem
    • Wrapping Up
  • Chapter 7 - Creating Your Own Flowables
    • Creating a Line Flowable
    • Creating a Bordered Textbox + Line Flowable
    • Modifying a Pre-Existing Flowable
    • Wrapping Up
  • Chapter 8 - Intro to Graphics and Charts
    • What is a Drawing?
    • ReportLab’s Renderers
    • The Coordinate System
    • A Simple Drawing
    • Supported Outputs
    • Verifying Attributes
    • Naming Shapes
    • Charts and Graphs
    • Labels
    • Axes
    • Bar Charts
    • Line Charts
    • Line Plots
    • Pie Charts
    • Adding Titles and Legends
    • Odds and Ends
    • Wrapping Up
  • Chapter 9 - Other Graphics
    • Shapes
    • Widgets
    • Bar Codes
    • Wrapping Up
  • Chapter 10 - Creating Special Features in Your PDF
    • File Annotations
    • Bookmarks
    • Page Transitions
    • Encryption
    • Interactive Forms
    • Wrapping Up
  • Part II - Tutorials and How-Tos
  • Chapter 11 - Turning Data into PDFs
    • Getting Started
    • Creating the Base Template Class
    • Refactoring the EOB Class
    • Creating a Multipage Document
    • Using Real Data
    • Consuming XML
    • Wrapping Up
  • Chapter 12 - Custom Headers and Footers
    • A Naive Header
    • Putting the Header on Every Page
    • Adding a Logo
    • Configurable Logos
    • Adding Page Numbers
    • Adding a Page Number of Total
    • Headers + Footers
    • Wrapping Up
  • Chapter 13 - Creating a PDF Library
    • Accepting Different Data Formats
    • Multipage Data Files
    • Custom Stylesheets
    • Configuring Your Application
    • Adding a Graphical User Interface
    • Finishing the User Interface
    • Wrapping Up
  • Chapter 14 - The PyPDF2 Package
    • Installation
    • Extracting Metadata from PDFs
    • Extracting Text from PDFs
    • Splitting PDFs
    • Merging Multiple PDFs Together
    • Rotating Pages
    • Overlaying / Watermarking Pages
    • PDF Encryption
    • Wrapping Up
  • Chapter 15 - The pdfrw Package
    • Installation
    • Extracting Information from PDF
    • Splitting
    • Merging / Concatenating
    • Rotating
    • Overlaying / Watermarking Pages
    • Scaling
    • Combining pdfrw and ReportLab
    • Wrapping Up
  • Chapter 16 - Extracting and Exporting Data from PDFs
    • Extracting Text with PDFMiner
    • Exporting Text via pdf2txt.py
    • Extracting Text with Slate
    • Exporting Your Data
    • Exporting to XML
    • Exporting to JSON
    • Exporting to CSV
    • Extracting Images
    • Wrapping Up
  • Chapter 17 - Filling in PDF Forms
    • Creating a Simple Form
    • Merging Overlays
    • Other Ways to Fill Forms
    • Using the pdfforms Package
    • Wrapping Up
  • Chapter 18 - Converting Markup to PDF
    • rst2pdf
    • WeasyPrint
    • Pandoc
    • LaTeX
    • Wrapping Up
  • Chapter 19 - The PyFPDF Package
    • Installation
    • Basic Usage
    • Working with Fonts
    • Drawing
    • Adding Images
    • Multipage Documents
    • Headers and Footers
    • Tables
    • Transform HTML to PDF
    • Web2Py
    • Templates
    • Wrapping Up
  • Appendix A - Adding SVG Files in ReportLab
    • Dependencies
    • Installation
    • Usage
    • Drawing on the Canvas
    • Adding an SVG to a Flowable
    • Scaling SVGs in ReportLab
    • Using SVG Plots from matplotlib in ReportLab
    • Using svg2pdf
    • Wrapping Up
  • Appendix B - Getting System Fonts
    • The fontTools Package
    • Getting the System’s Fonts
    • Wrapping Up
  • Appendix C - Creating a Color Demo
    • Getting the Colors
    • Wrapping Up
  • Afterword and Thanks

Bundles that include this book

Python 101
Python 201
ReportLab - PDF Processing with Python
Jupyter Notebook 101
4 Books
$42.97
Regular Price
$29.99
Bundle Price

About the Author

Michael Driscoll
Michael Driscoll

Michael has been programming with Python since 2006. He is the author of the popular Python blog, The Mouse Vs. the Python. Michael has been a technical reviewer for Packt Publishing for several years.  

He also co-authored The Essential Core Python Cheat Sheet for DZone. You can get it here: http://refcardz.dzone.com/refcardz/core-python

Michael released his first book, Python 101, June 3rd, 2014. He wrote the follow up, Python 201: Intermediate Python and published it in the summer of 2016. He is also the author of wxPython Cookbook from Apress as well as Python Interviews from Packt Publishing.

Michael is currently working on some new books as well.

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub