Skip to main content

Full-page HTML/URL to PNG screenshotter — CLI + drag-and-drop GUI

Project description

HTML RenderFriend

Full-page PNG screenshot utility for HTML files and URLs — CLI + drag-and-drop GUI

Renders any web page or local .html file into a complete, scroll-captured PNG using the same Chromium engine as Google Chrome. Includes both a command-line tool and a modern drag-and-drop graphical interface.


How it works

Producing a screenshot that captures the entire page height requires a full browser engine. Playwright launches a headless Chromium instance, navigates to your content, waits for all resources and JavaScript to settle, scrolls the page, then captures everything — including overflow content that would only appear after scrolling. This is fundamentally different from static converters that ignore JS-driven layout.


Features

Feature CLI GUI
Remote URLs (http/https)
Local .html / .htm files
Paste raw HTML directly
Drag-and-drop from Explorer
Configurable viewport width
Retina 2× output (deviceScaleFactor)
Full-page scroll capture
Timestamped log pane
Dark / light theme toggle
Open output folder in Explorer

Installation (Windows 10)

One-click setup

git clone https://github.com/bra-khet/html-renderfriend.git
cd html-renderfriend
setup.bat

setup.bat creates a virtual environment, installs all pip packages, and downloads the Chromium browser (~150 MB, once).

Manual setup

python -m venv venv
venv\Scripts\activate
pip install -e .
playwright install chromium

Requirements: Python 3.11+. Check with python --version.


Usage

Graphical interface (recommended)

gui.bat

Or double-click gui.bat. The window opens with three ways to provide input:

Input method How
Drag and drop Drag any .html file from Windows Explorer onto the green drop zone
URL / path Type or paste into the entry field on the "Drop / URL" tab
Paste HTML Switch to the "Paste HTML" tab, paste raw markup, click Screenshot

Keyboard shortcuts: Ctrl+S screenshot · Ctrl+D paste clipboard as source · Esc quit

Output defaults to Desktop/screenshot_<timestamp>.png. Use Save As… to pin a fixed path.


Command-line interface

# Activate the venv first
venv\Scripts\activate

# Remote URL
htmlrf https://example.com -o example.png

# Local HTML file
htmlrf "C:\MyPages\report.html" -o report.png --width 1440

# See all options
htmlrf --help

Drag-and-drop CLI: drag an .html file onto screenshot.bat for an instant screenshot saved as screenshot.png in the same directory.

Options

Flag Default Description
input (required) URL or path to .html / .htm file
-o / --output screenshot.png Output PNG path
-w / --width 1920 Viewport width: 1280, 1440, 1920, 2560

Project structure

html-renderfriend/
├── src/
│   └── htmlrf/
│       ├── __init__.py
│       ├── screenshot.py    # Core CLI + take_full_screenshot() shared with GUI
│       └── gui.py           # Drag-and-drop GUI (CustomTkinter + TkinterDnD2)
├── tests/
├── pyproject.toml           # Build metadata and dependencies (hatchling)
├── setup.bat                # One-click install script
├── screenshot.bat           # CLI drag-and-drop wrapper
├── gui.bat                  # GUI launcher
├── .gitignore
├── LICENSE                  # MIT
└── README.md

Building a standalone EXE (optional)

pip install pyinstaller
pip install -e .
pyinstaller --onefile --windowed --name htmlrf src/htmlrf/gui.py

The resulting dist\htmlrf.exe bundles everything except the Chromium browser, which Playwright downloads on first run.


Roadmap

  • Batch processing — screenshot a list of URLs from a .txt file
  • PDF export alongside PNG
  • Configurable wait conditions and CSS injection
  • GitHub Actions CI for cross-platform testing

License

MIT — see LICENSE.


Last updated: March 26, 2026

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

html_renderfriend-1.0.0.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

html_renderfriend-1.0.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file html_renderfriend-1.0.0.tar.gz.

File metadata

  • Download URL: html_renderfriend-1.0.0.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for html_renderfriend-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d56dbd8b8a57858cfef087b44ae5a332194cc6179cc2d0414fdc6b0c22f3e2ce
MD5 2ccace83836798a83eb74a7fb4fbd8a8
BLAKE2b-256 243927a4103510f4efa7885a39a89f5b9e0ffc8e14ff51e45c76f5a4173a48b5

See more details on using hashes here.

File details

Details for the file html_renderfriend-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for html_renderfriend-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aad20309756b2f707ad11031d998496600821006256c30d3c0d60f3a1aedb5da
MD5 e286a327c11516b0d011e1eb7396b69b
BLAKE2b-256 f59b160ce2221a2ca673c64c0d64cfc8a56cf628dc849cf66fe5aebbfac48c10

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page