Skip to content

Python script to tile large PDF files onto multiple 8.5x11 pages

Notifications You must be signed in to change notification settings

plutusmaximus/PdfTiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

PdfTiler

PdfTiler is a Python script that takes a large, single-page PDF (such as a poster, map, or architectural drawing) and tiles it across multiple standard US Letter (8.5" x 11") pages. The output is a new PDF in which each page is a "tile" that can be printed on a regular printer, trimmed, and assembled to recreate the original large page.

Features

  • Automatic Tiling: Splits a large PDF page into multiple 8.5"x11" tiles with configurable margins.
  • Customizable Paper Size: Default is US Letter, but you can specify any paper size in inches.
  • Crop and Center: Each tile is cropped from the source and centered on its own page.
  • Print-Ready Output: Each tile page includes a thin magenta rectangle annotation marking the crop boundary for easy trimming and assembly.
  • Simple Command-Line Usage

Requirements

  • Python 3.7+
  • pypdf (install via pip install pypdf)

Usage

python PdfTiler.py input.pdf output.pdf
  • input.pdf: The source PDF file (should contain a single, large page).
  • output.pdf: The path to write the tiled output PDF.

Optional Parameters

If you want to change paper size or margins, modify the tile_pdf call in PdfTiler.py:

tile_pdf(
    input_pdf_path, 
    output_pdf_path, 
    paper_width_inches=8.5,    # Width of paper in inches
    paper_height_inches=11.0,  # Height of paper in inches
    margin=1                   # Margin in inches on all sides
)

Example

Suppose you have a 36"x24" poster as a single-page PDF. Run:

python PdfTiler.py poster.pdf poster_tiled.pdf

This will generate a poster_tiled.pdf consisting of enough 8.5"x11" pages to cover the entire poster, with magenta crop marks on each tile.

How It Works

  • Reads the first page of the input PDF.
  • Calculates how many tiles (rows/columns) are needed to cover the whole page based on the paper size and margins.
  • Crops each tile from the original page and centers it on a new blank page.
  • Adds a magenta rectangle annotation marking the tile boundary.
  • Writes the resulting multi-page PDF for printing.

Tips

  • Make sure your input PDF is a single page. If it's not, you can extract a page using PDF editors or tools.
  • When printing, set scale to 100% (no scaling) to preserve the correct tile sizes.
  • Use the magenta rectangles to trim each tile before assembly.

Limitations

  • Only processes the first page of the input PDF.
  • Tested with vector PDFs; results may vary with scanned/image-based PDFs.
  • Only outputs US Letter by default; change parameters for other paper sizes.

License

MIT License


Inspired by the need to print large posters on regular printers.

About

Python script to tile large PDF files onto multiple 8.5x11 pages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages