A Python-based PDF notebook generator designed specifically for e-ink tablets like reMarkable and Onyx Boox devices. Generate custom notebooks with dots, lines, grids, or blank pages, complete with hyperlinked table of contents and page numbers.
Try it online: https://eink-notebook-templates.streamlit.app/
- 🎯 Multiple Patterns: Dots, lines, grid, or blank pages
- 📱 Device-Specific Sizes: Pre-configured for reMarkable and Onyx Boox tablets
- 🔗 Hyperlinked Navigation: Clickable page numbers and table of contents
- 📑 Professional Layout: Title page and TOC with customizable fields
- ⚙️ Highly Customizable: Margins, spacing, fonts, and page number positions
- 📦 Batch Generation: Create multiple PDFs at once for different devices and patterns
- 🎨 Beautiful Typography: Uses EB Garamond font for title and TOC pages
- reMarkable 1 (10.3" - 157 × 210 mm)
- reMarkable 2 (10.3" - 157 × 210 mm)
- reMarkable Paper Pro (11.8" - 179 × 239 mm)
- reMarkable Paper Pro Move (7.3" - 91 × 162 mm)
- Onyx Boox Note Air (10.3" - 157 × 209 mm)
- Onyx Boox Note Air 3 (10.3" - 157 × 209 mm)
- Onyx Boox Note Air 3C (10.3" - 157 × 209 mm)
- Onyx Boox Note Air 4C (10.3" - 157 × 209 mm)
- Onyx Boox Note Air 5C (10.3" - 157 × 209 mm)
- Onyx Boox Note Max (13.3" - 203 × 270 mm)
- Onyx Boox Max Lumi (13.3" - 203 × 270 mm)
- Onyx Boox Tab Mini C (7.8" - 119 × 158 mm)
- Onyx Boox Tab Ultra C Pro (10.3" - 157 × 209 mm)
- Onyx Boox Tab X (13.3" - 203 × 270 mm)
- Onyx Boox Tab X C (13.3" - 203 × 270 mm)
- Onyx Boox Go 6 (6" - 91 × 123 mm)
- Onyx Boox Go 7 (7" - 107 × 142 mm)
- Onyx Boox Go 10.3 (10.3" - 157 × 209 mm)
- Onyx Boox Palma 2 (6.13" - 70 × 140 mm)
- Kindle Scribe (10.2" - 157 × 210 mm)
- Supernote A5X (10.3" - 158 × 210 mm)
- Supernote A6X (7.8" - 119 × 159 mm)
- Supernote A6X2 Nomad (7.8" - 119 × 159 mm)
- Supernote A5X2 Manta (10.7" - 163 × 217 mm)
- A4, A5, Letter, Legal
- Python 3.7+
- reportlab
pip install reportlabgit clone https://github.com/yourusername/Notebook-Templates.git
cd Notebook-Templatesfrom pdf_notebook import PDFHyperlinkedNotebookGenerator
# Create a dot-grid notebook for reMarkable 2
generator = PDFHyperlinkedNotebookGenerator(
filename="my_notebook.pdf",
num_pages=100,
page_size='remarkable2',
page_pattern='dots'
)
generator.generate()from pdf_notebook import PDFNotebookBatchGenerator
# Generate all device/pattern combinations
batch = PDFNotebookBatchGenerator(
num_pages=256,
output_dir='toc-notebook'
)
stats = batch.generate_all()
print(f"Generated {stats['generated']} PDFs")generator = PDFHyperlinkedNotebookGenerator(
filename="notebook.pdf",
num_pages=100,
page_size='remarkable2',
margins={'left': 10, 'right': 10, 'top': 15, 'bottom': 15}
)
generator.generate()# Dot grid (default)
generator = PDFHyperlinkedNotebookGenerator(
filename="dots.pdf",
page_pattern='dots',
spacing_mm=5,
num_pages=50
)
# Horizontal lines
generator = PDFHyperlinkedNotebookGenerator(
filename="lines.pdf",
page_pattern='lines',
spacing_mm=7,
num_pages=50
)
# Grid
generator = PDFHyperlinkedNotebookGenerator(
filename="grid.pdf",
page_pattern='grid',
spacing_mm=5,
num_pages=50
)
# Blank pages
generator = PDFHyperlinkedNotebookGenerator(
filename="blank.pdf",
page_pattern='blank',
num_pages=50
)# Available positions: 'lower-left', 'lower-right', 'lower-middle',
# 'upper-right', 'upper-middle', or None
generator = PDFHyperlinkedNotebookGenerator(
filename="notebook.pdf",
num_pages=100,
page_number_position='lower-left' # Default
)generator = PDFHyperlinkedNotebookGenerator(
filename="simple_notebook.pdf",
num_pages=100,
include_title_page=False,
include_toc=False
)batch = PDFNotebookBatchGenerator(
devices=['remarkable2', 'booxnoteair'],
patterns=['dots', 'lines'],
num_pages=100,
output_dir='toc-notebook'
)
batch.generate_all()| Parameter | Type | Default | Description |
|---|---|---|---|
filename |
str | Required | Output PDF filename |
num_pages |
int | 1 | Number of content pages |
page_size |
str/tuple | A4 | Device name or (width, height) in points |
page_pattern |
str | 'dots' | Pattern: 'dots', 'lines', 'grid', 'blank' |
spacing_mm |
float | 5 | Spacing between dots/lines/grid in mm |
dot_radius |
float | 0.5 | Dot radius in points (for dot pattern) |
margins |
dict | See below | Margins in mm: {'left', 'right', 'top', 'bottom'} |
left_margin_mm |
float | 5 | Left margin in mm |
right_margin_mm |
float | 5 | Right margin in mm |
top_margin_mm |
float | 5 | Top margin in mm |
bottom_margin_mm |
float | 5 | Bottom margin in mm |
page_number_position |
str | 'lower-left' | Page number position or None |
include_title_page |
bool | True | Include title page |
include_toc |
bool | True | Include table of contents |
toc_line_spacing_mm |
float | 8 | TOC line spacing in mm |
You can use either full names or short aliases:
remarkable1orrm1remarkable2orrm2remarkableproorproremarkablemoveormovebooxnoteair,booxnoteair3,booxnoteair3c,booxnoteair4cbooxgo,booxmaxlumi,booxnotemax,booxtabminickindlescribesupernotea5x,supernotea6x,supernotea6x2,supernotemanta
Notebook-Templates/
├── pdf_notebook.py # Main Python module
├── pdf-notebook.ipynb # Jupyter notebook with examples
├── toc-notebook/ # Generated PDFs (created automatically)
├── .gitignore # Git ignore rules
├── .vscode/ # VSCode settings
└── README.md # This file
generator = PDFHyperlinkedNotebookGenerator(filename="notebook.pdf", num_pages=50)
# Get current margins
print(generator.get_margins())
# {'left': 5, 'right': 5, 'top': 5, 'bottom': 5}
# Update margins before generating
generator.set_margins(left=10, right=10)
generator.set_margins(margins={'top': 15, 'bottom': 15})
generator.generate()from reportlab.lib.units import mm
# Custom size (width, height) in points
custom_size = (200 * mm, 250 * mm)
generator = PDFHyperlinkedNotebookGenerator(
filename="custom.pdf",
page_size=custom_size,
num_pages=50
)batch = PDFNotebookBatchGenerator()
print("Devices:", batch.list_devices())
print("Patterns:", batch.list_patterns())Open pdf-notebook.ipynb in Jupyter Notebook to explore interactive examples:
jupyter notebook pdf-notebook.ipynbThe notebook includes examples for:
- Batch generation
- Selective device/pattern generation
- Custom single PDF creation
- Accessing class constants
- Dynamic margin manipulation
Batch generation creates files with the format:
[Device Name] - [Pattern].pdf
Examples:
reMarkable 2 - Dots.pdfOnyx Boox Note Air 3 - Lines.pdfreMarkable Paper Pro - Grid.pdf
- Page Numbers: Click any page number to jump to the TOC
- Table of Contents: Click any TOC entry to jump to that page
- Bookmarks: PDF bookmarks for easy navigation in PDF readers
Automatically generated title page includes fields for:
- Notebook title
- Description (purpose)
- Author
- Date From / Date To
- Tags
All fields are editable in the PDF after generation.
- Content Pages: Arial font for clean, readable page numbers
- Title & TOC: EB Garamond serif font for elegant appearance
- Fallback: Uses Helvetica if EB Garamond is unavailable
Typical generation times:
- 100 pages: ~2-3 seconds
- 256 pages: ~5-7 seconds
- Batch (all devices/patterns): ~2-3 minutes
If you see warnings about EB Garamond font:
Could not find EB Garamond font, using Helvetica as fallback
This is normal. The generator will use Helvetica for title/TOC pages instead.
ModuleNotFoundError: No module named 'reportlab'
Install reportlab: pip install reportlab
The canvas is automatically initialized when creating a generator instance. No manual setup required.
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.
git clone https://github.com/yourusername/Notebook-Templates.git
cd Notebook-Templates
pip install reportlabpython pdf_notebook.pyThis will generate sample PDFs in the toc-notebook/ directory.
This project is available under the MIT License. See LICENSE file for details.
- Built with ReportLab PDF library
- Typography uses EB Garamond font
- Designed for reMarkable and Onyx Boox e-ink tablets
For questions, issues, or feature requests, please open an issue on GitHub.
Made with ❤️ for the e-ink tablet community