Convert HTML, Markdown, and DOCX documents into continuous, single-page PDFs.
Project description
Seamless PDF
Convert HTML, Markdown, and DOCX documents into continuous, single-page PDFs -- no page breaks.
Standard PDF converters split your content across fixed-size pages. Seamless PDF renders the entire document onto a single continuous page perfectly sized to the content's width and height. Ideal for long-form reports, documentation snapshots, newsletters and any workflow where page breaks get in the way or you want to retain the original content viewing experience.
Features
| Feature | Description |
|---|---|
| Single-Page Output | One continuous PDF sized exactly to your content |
| Multi-Format Input | Supports .html, .md, .markdown, and .docx files |
| CLI & Python API | Use from the terminal or integrate directly into your code |
| Markdown Rendering | GitHub-flavored Markdown with syntax highlighting via Pygments |
Installation
pip install seamless-pdf
python -m playwright install chromium
playwright install
Note: Playwright uses a headless Chromium browser under the hood to render documents. The second command downloads the browser binary. For first time installs of playwright or updates you may need download the new browsers with
playwright install.
Quick Start
Command Line
seamless-pdf input.html -o output.pdf
seamless-pdf README.md -o README.pdf
seamless-pdf report.docx -o report.pdf
Python API
from seamless_pdf import convert
convert("input.html", "output.pdf")
convert("README.md", "readme.pdf")
convert("report.docx", "report.pdf")
Usage
The convert function automatically detects the input format from the file extension (.html, .htm, .md, .markdown, .docx). You can also specify the format explicitly:
from seamless_pdf import convert
# Auto-detected as Markdown
convert("docs/notes.md", "notes.pdf")
# Explicit input type override
convert("docs/notes.txt", "notes.pdf", input_type="markdown")
Supported Input Types
| Extension | Type Keyword |
|---|---|
.html, .htm |
html |
.md, .markdown |
markdown |
.docx |
docx |
Requirements
| Dependency | Version |
|---|---|
| Python | 3.10, 3.11, 3.12, 3.13 |
| Playwright (Chromium) | >= 1.40.0 |
| markdown | >= 3.10.1 |
| Pygments | >= 2.17.0 |
| pymdown-extensions | >= 10.0 |
| mammoth | >= 1.6.0 |
Roadmap
- PDF-to-PDF re-rendering (merge & reflow existing PDFs)
- Improved error handling and diagnostics
- Broader PDF manipulation toolset
- Dark mode PDF output
Cloning for your purposes...
git clone https://github.com/SleepyPandas/Document-to-ContinuousPDF.git
cd Document-to-ContinuousPDF
pip install -e ".[dev]"
pytest
License
This project is licensed under the MIT License -- see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seamless_pdf-0.3.0.tar.gz.
File metadata
- Download URL: seamless_pdf-0.3.0.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0593aaf339840e8c131e4b9956ff07e05b2bd781fb02c6811539ee7991487d8b
|
|
| MD5 |
a2c331257228f908e5e921037c44231e
|
|
| BLAKE2b-256 |
e89bbd1656b076331bce07b5f00ab229195a8271947a8a7beb69af1d4b9a94b3
|
Provenance
The following attestation bundles were made for seamless_pdf-0.3.0.tar.gz:
Publisher:
publish.yml on SleepyPandas/Seamless-pdf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
seamless_pdf-0.3.0.tar.gz -
Subject digest:
0593aaf339840e8c131e4b9956ff07e05b2bd781fb02c6811539ee7991487d8b - Sigstore transparency entry: 929607011
- Sigstore integration time:
-
Permalink:
SleepyPandas/Seamless-pdf@0451be83390039be4456891fa4f1dfcf291efe70 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/SleepyPandas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0451be83390039be4456891fa4f1dfcf291efe70 -
Trigger Event:
release
-
Statement type:
File details
Details for the file seamless_pdf-0.3.0-py3-none-any.whl.
File metadata
- Download URL: seamless_pdf-0.3.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55adbfe64799589281580ca1c513a5443178aff4b37590cde7adb712d61e44e4
|
|
| MD5 |
b42e76f2d6a8718566ba102f9189fd95
|
|
| BLAKE2b-256 |
6217b2d1b21ee6e4f3d36438852f4ccb5e9d2a45f9b4c6f04fd819befbf2395d
|
Provenance
The following attestation bundles were made for seamless_pdf-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on SleepyPandas/Seamless-pdf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
seamless_pdf-0.3.0-py3-none-any.whl -
Subject digest:
55adbfe64799589281580ca1c513a5443178aff4b37590cde7adb712d61e44e4 - Sigstore transparency entry: 929607013
- Sigstore integration time:
-
Permalink:
SleepyPandas/Seamless-pdf@0451be83390039be4456891fa4f1dfcf291efe70 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/SleepyPandas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0451be83390039be4456891fa4f1dfcf291efe70 -
Trigger Event:
release
-
Statement type: