Skip to content

A simple script to add page numbers to a PDF file. Some scanned public domain books on Google Books does not have page numbers, so we create this script to automatically add page numbers thereto.

License

Notifications You must be signed in to change notification settings

hnthap/pdf-page-numbering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Page Numbering

Before After

Figure 1: Before (left) and after (right) adding page number on (top-center).

A simple script to add page numbers to a PDF file.

Some scanned public domain books on Google Books does not have page numbers (see Fig. 1), so we create this script to automatically add page numbers thereto.

This is just a Python script, not a module or a software on its own. Just download the script file and use.

Requirements

Python 3, Pillow (PIL), pymupdf, and tqdm. Install them with:

pip install Pillow PyMuPDF tqdm

Usage

# Make sure you had `pdf_numbering.py` in working directory
python pdf_numbering.py input.pdf output.pdf

About

A simple script to add page numbers to a PDF file. Some scanned public domain books on Google Books does not have page numbers, so we create this script to automatically add page numbers thereto.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages