Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use a real browser renderer, then loop over your inputs. HTML-to-JPG conversion means loading each local file or URL so its CSS, JavaScript, fonts, and images render, and saving a JPEG screenshot. Playwright provides the per-page operation; your batch script adds input enumeration, waits, deterministic names, error handling, retries, and cleanup.

What batch HTML-to-JPG conversion actually does

An HTML file is not an image that can be renamed. A browser must build the page, run scripts, apply styles, fetch assets, and paint pixels. The conversion pipeline is therefore:

  1. Collect local HTML paths, URLs, or a mixture of both.
  2. Open each input in a browser context.
  3. Wait for the content required in the output.
  4. Capture the viewport or the complete scrollable page as JPEG.
  5. Write a unique filename and record success or failure.

Playwright’s page.screenshot() API supports JPEG output, a destination path, quality from 0 to 100, and scale selection. Its documented default JPEG quality is 80. A full-page capture includes content below the current viewport; a normal capture includes only what is visible.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the capture behavior before writing code

Viewport or full page

  • Viewport: captures the currently visible browser area. Use it for cards, hero sections, social previews, or fixed-size thumbnails.
  • Full page: captures the complete scrollable document, including content below the fold. Use it for invoices, articles, and long reports. Very tall pages can create large JPEG files, so inspect output dimensions and memory use.

CSS scale or device scale

CSS scale targets one output pixel per CSS pixel. Device scale captures device pixels and can produce a larger image on a high-density setting. Choose deliberately: CSS scale keeps dimensions predictable, while device scale is useful when you need a denser raster for downstream processing.

#1 Best Overall
Sale
Liene M100 4x6'' Photo Printer, Phone Printer 100 Sheets & 3 Cartridges, Full-Color Photo, Portable Instant Photo Printer for iPhone Android, Thermal Dye Sublimation, Wi-Fi Picture Printer 100 Papers
  • User-Friendly Portable Photo Printer for iPhone, Android & PC - Get beautiful and colourful memories with Liene 4x6 photo printer! After opening the entire package, you can find one cartridge + 20 sheets of photo paper (placed inside the machine packaging), as well as an additional box containing 80 sheets of photo paper (which includes two cartridges + 80 sheets of photo paper). Full package includes smartphone photo printer, Liene 4x6 photo printer papers (100 sheets), 3 colour cartridges, and fully sealed cassette to prevent dust. Minimalist and magnetic design for compact storage.
  • Superior Quality 4x6 Photo Printer - Print photos like no other thanks to the thermal-dye sublimation tech adopted by the picture printer for iphone. The dyes deeply penetrate the paper for vibrant photo printing, and the laminated surface is resistant to water, scratches, fingerprints and fading. Clean the print head promptly if smudges are observed on printed photos during operation. Get Liene photo printers now for yourself and your loved ones, print your happy moments together and keep your love forever!
  • Wi-Fi Photo Printer for Smartphone - The built-in hotspot of the photo printer makes it easy to print pictures from your phone, avoiding outside interference with a fast and stable connection. No other networks required! Simply connect your device to the independent instant photo printer 4x6 hotspot.
  • Multiple Device Compatibility - Liene phone printer provides instant photo printing for up to 5 simultaneous connections. Share with family and friends or print from your different devices. No additional cables or Bluetooth required when printing photos with this picture printer. Note: Ensure the ink cartridge clicks into place before printing.
  • Customize your Printing with the Liene App - Customize your photos with our specialized App! You can add a Square border, insert filters, enhance the contrast and brightness, check printing status, and more. You can even print your ID and Visa photos from home with this photo printer for iphone 4x6 prints.

JPEG quality

Playwright documents a quality range of 0–100 and a default of 80. Start with 80 for ordinary web imagery, then inspect representative pages. Increase quality when text or fine lines show artifacts; decrease it when file size matters. There is no universally optimal value established for every document.

Prepare your inputs and rendering environment

Local documents

Resolve each file to an absolute path and confirm that relative links work from that document’s directory. Local pages often reference sibling CSS, images, fonts, or scripts. If those assets are missing or blocked, the screenshot can be visually incomplete even though the command succeeds.

Remote URLs

Confirm that the machine running Chromium can reach every origin used by the page. External fonts, image CDNs, analytics scripts, authentication, and geo-dependent content can change the result. Keep a stable mapping from each URL to an output name rather than deriving names that collide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Playwright

In a new Python project, install the Playwright package and its browser binaries. The exact browser installation command depends on your operating system and project setup; use the installation instructions for your Playwright release, then verify that Chromium launches before processing a large batch.

Complete Python batch converter with Playwright

The following script accepts a text file containing one local path or URL per line. Blank lines and lines beginning with # are ignored. It captures each page independently, continues after failures, and writes a CSV-style report.

Rank #2
KODAK Dock Plus 4x6 Photo Printer, Smartphone Docking, 4PASS, 50 Sheets
  • Dock Photo Printer: The KODAK Dock Plus is a home photo printer that produces high-quality 4x6” prints directly from compatible smartphones. Featuring an integrated docking station, users can place their phone on the printer for better connection while simultaneously charging the device during printing.
  • Genuine 4PASS dye sublimation printing: Each photo is produced in three color layers and finished with a clear protective lamination layer. In approximately 55 seconds, you receive a smooth, detailed print designed to resist fingerprints, water, and fading for long-lasting quality.
  • Easy to Use: Print photos quickly without complicated setup or technical steps. Simply power on, connect wireless bluetooth, and start printing within seconds. The Dock Plus is built for straightforward operation, making it ideal for first time users and everyday photo printing.
  • Home Printing Station: Designed for stable desktop use, this dock photo printer connects to a power outlet for consistent performance and larger 4x6” prints. Ideal for home printing, photo albums, framing, family events, and everyday picture printing.
  • KODAK Photo Printer APP: Featuring integrated Bluetooth connectivity, this portable printer connects to compatible iOS and Android devices through the KODAK Photo Printer app. Edit, crop, and customize your photos before printing for creative results.
from pathlib import Path
from urllib.parse import urlparse
import csv
import re
from playwright.sync_api import sync_playwright, TimeoutError as PlaywrightTimeoutError

INPUT_LIST = "inputs.txt"
OUTPUT_DIR = Path("jpg-output")
VIEWPORT = {"width": 1440, "height": 900}
JPEG_QUALITY = 80
FULL_PAGE = True


def safe_name(value: str, index: int) -> str:
    parsed = urlparse(value)
    base = Path(parsed.path).stem if parsed.scheme else Path(value).stem
    base = re.sub(r"[^A-Za-z0-9._-]+", "-", base).strip("-") or "page"
    return f"{index:05d}-{base}.jpg"


def open_input(page, item: str):
    if urlparse(item).scheme in ("http", "https"):
        page.goto(item, wait_until="domcontentloaded", timeout=90000)
    else:
        page.goto(Path(item).resolve().as_uri(), wait_until="domcontentloaded", timeout=90000)


items = [
    line.strip() for line in Path(INPUT_LIST).read_text(encoding="utf-8").splitlines()
    if line.strip() and not line.lstrip().startswith("#")
]
OUTPUT_DIR.mkdir(parents=True, exist_ok=True)

with sync_playwright() as p:
    browser = p.chromium.launch()
    context = browser.new_context(viewport=VIEWPORT)
    page = context.new_page()
    with (OUTPUT_DIR / "report.csv").open("w", newline="", encoding="utf-8") as report_file:
        report = csv.writer(report_file)
        report.writerow(["input", "status", "output", "error"])
        for index, item in enumerate(items, start=1):
            output = OUTPUT_DIR / safe_name(item, index)
            try:
                open_input(page, item)
                page.screenshot(
                    path=str(output),
                    type="jpeg",
                    quality=JPEG_QUALITY,
                    full_page=FULL_PAGE,
                    scale="css",
                )
                report.writerow([item, "ok", str(output), ""])
                print(f"OK   {item} -> {output}")
            except PlaywrightTimeoutError as exc:
                report.writerow([item, "timeout", "", str(exc)])
                print(f"TIMEOUT {item}: {exc}")
            except Exception as exc:
                report.writerow([item, "error", "", str(exc)])
                print(f"ERROR {item}: {exc}")
    context.close()
    browser.close()

Create inputs.txt with one item per line, for example:

pages/home.html
pages/pricing.html
https://example.com/report

The script uses domcontentloaded as a baseline. Pages that fill in content after that event need a page-specific wait before the screenshot.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Wait for the page you actually need

Navigation completion does not guarantee that lazy images, client-rendered data, or web fonts are ready. Add the narrowest reliable condition for each site:

  • Selector: wait for a known result container or a “loaded” marker.
  • Network idle: useful for pages that finish loading after several requests, but unsuitable for apps that keep connections open.
  • Fixed delay: a last resort when no deterministic marker exists; keep it as short as your content allows and document why it is needed.
  • Fonts and images: for documents where typography or imagery is essential, wait for the page’s font readiness and image completion in a page-specific script.

Do not use one universal delay for unrelated pages. Record the wait policy with the input so a later rerun is reproducible.

Scaling a batch safely

Concurrency

Start with one page at a time. Parallel pages can reduce wall-clock time, but each browser context consumes CPU, memory, network bandwidth, and temporary disk space. Increase concurrency gradually and watch for renderer crashes, throttling, or incomplete assets. The Playwright documentation describes screenshot operations per page; the loop and concurrency policy are application design choices.

Rank #3
Nelko PP01 Photo Printer, 2x3 Portable Photo Printer, Mini Printer, White
  • 2x3" Portable Photo Printer: The upgraded PP01 photo printer uses advanced inkjet technology. This portable photo printer produces vivid, full-color prints on premium sticky-backed photo paper that is smudge-proof, water-resistant, and tear-resistant. The Nelko mini photo printer is pocket-sized and weighs only 308g, making it ultra-portable for school, travel, and field trips. Each ink cartridge prints up to 80 full-color 2x3 photos on sticky-backed paper
  • Easy Printing via Bluetooth: The PP01 mini photo printer is compatible with iOS and Android phones via Bluetooth. Simply download the Nelko app from Google Play or the App Store. Load the 2x3 photo paper with the smooth side facing down. Install the ink cartridge, connect via Bluetooth, and print directly using the Nelko app. A USB charging cable is included; the adapter is not included
  • High Photo Quality: This mini photo printer uses advanced inkjet technology for clear, vibrant prints. This portable photo printer produces 600 DPI high-resolution images with precise colors, capturing fine details and realistic tones. Each photo comes with adhesive backing, perfect for scrapbooks and preserving your memories. Personalize every photo for holidays, birthdays, or daily events
  • Powerful App: The Nelko 2x3" PP01 photo printer app lets you edit photos and offers a variety of frame designs, making it perfect for personalizing your photos for projects like scrapbooking or journaling. Download the Nelko app to create collages and customize photos with filters, graffiti, borders, stickers, text, AI image editing, and many other features. Edit photos on your phone, then send them to the Nelko app for instant printing in under 90 seconds
  • Versatile Usage Scenarios: This portable photo printer is ideal for travel journals, party favors, and family gatherings. Students use it for planners and photo printing. Crafters use it for DIY projects, custom labels, and scrapbooking. It's a practical tool for bloggers, small businesses, and event photographers to create instant giveaways. Perfect for Mother's Day surprises and heartfelt moments with loved ones using Nelko sticky-backed photo paper.

Retries and idempotence

Retry transient navigation failures, but do not blindly retry a deterministic 404 or authentication error. Use a stable output name and write to a temporary file before renaming it to .jpg; this prevents a partially written file from being mistaken for a successful result.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Logging

Keep the original input, timestamp, status, error text, viewport, scale, quality, and wait policy. A manifest lets you rerun only failed items and compare output changes after a site update.

When to use an HTML-to-image service

A hosted renderer can be appropriate when conversion is a recurring application feature and you do not want to maintain browser binaries, sandboxing, queues, and retries. ScreenshotRun describes an API that accepts HTML and returns an image, but its description is vendor-authored; verify its data handling, limits, pricing, availability, and security requirements directly. No independent speed, reliability, or cost comparison is established here.

Compare any local or hosted method on:

  • Local-file and remote-URL support.
  • JavaScript execution and external asset rendering.
  • Viewport versus full-page capture.
  • Viewport dimensions, device scale, and JPEG-quality controls.
  • Input enumeration, naming, retries, and per-item failure reporting.
  • Browser/runtime maintenance versus service dependency.
  • Data handling, limits, pricing, and regional availability.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. One GET request renders a URL as PNG, JPEG, WebP, or PDF, so a batch worker can call it once per input instead of installing Chromium. It removes cookie/consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status.

For a URL-based batch, pass the target URL for each iteration. The API supports full-page capture with lazy images loaded, CSS-selector element capture, dark mode, 12 device presets or any viewport, retina scale, PDF paper settings and page ranges, HTML/CSS-to-image, custom CSS and JavaScript, pre-capture clicks, hidden selectors, waits for selectors, delays or network idle, blocking ads/trackers/requests/resource types, custom headers/cookies/user agents/Authorization, timezone and geolocation, transparent backgrounds, image resizing, selectable-TTL caching, signed links, asynchronous jobs with signed webhooks, bulk capture of 100 URLs per call, a usage API, an OpenAPI specification, and parameter names compatible with other screenshot APIs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' }); const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

See the parameter reference at ScreenshotNeo’s documentation. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Every feature is available on every plan, and yearly billing gives two months free. An MCP server supplies take_screenshot, get_page_info, and capture_pdf tools to Claude, Cursor, or another MCP client.

Rank #4
Liene Amber M110 Bluetooth Photo Printer 80 Sheets, Portable Photo Printer for iPhone, Thermal Dye Sublimation, Picture Printer 60 Sheets 4x6 Paper & 20 Sheets 3" Square Sticker Paper & 2 Cartridges
  • Dual 4x6" & 3x3" Photo Printer Paper Tray Convenience: Seamlessly print both 6-inch standard photo paper and 3-inch sticky-backed paper with our innovative dual tray design. This compact phone photo printer for smartphone offers easy storage and quick access, making it perfect for diverse printing needs without taking up much space. Enjoy vibrant, high-quality prints every time.
  • Fast Bluetooth Connectivity: Experience lightning-fast printing with our liene photo printer's Bluetooth connection, which pairs in just 13 seconds. Enjoy a seamless and efficient printing experience, perfect for capturing and sharing memories on the go without the hassle of cables or complex setups.
  • Superior Quality Photo Printer 4x6 - Print photos like no other thanks to the thermal-dye sublimation tech adopted by the picture printer for iphone. The dyes deeply penetrate the paper for vibrant photo printing, and the laminated surface is resistant to water, scratches, fingerprints and fading. Get Liene photo printers now as amazing gifts for yourself and your loved ones, print your happy moments together and keep your love forever!
  • Multiple Device Compatibility - Liene picture printer for iphone provides instant photo printing for up to mutiple simultaneous connections. Share with family and friends or print from your different devices. No additional cables required when printing photos with this phone printer.
  • Customize your Printing with the Liene App - Customize your photos with our specialized App! You can add a Polaroid border, insert filters, enhance the contrast and brightness, check printing status, and more. You can even print your ID and Visa photos from home with this iphone photo printer for 4x6 & 3x3 prints.

Create a free ScreenshotNeo account to try 1,000 screenshots a month without adding a card.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting batch conversions

The JPG is blank or missing content

The page may still be rendering, an external asset may be inaccessible, or a script may require interaction. Check the page in the same environment, wait for a content selector, and verify network access to fonts, images, and APIs.

Only the top of a long page appears

Set full_page=True for Playwright screenshots. If the document uses an internal scrolling panel rather than the body, capture that element or adjust the page before capture.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Output dimensions or file sizes are unexpected

Check viewport dimensions, scale, full-page behavior, and JPEG quality. Device scale can multiply pixel dimensions; full-page mode can make very tall files.

One failure stops the run

Keep the screenshot call inside a per-item try/except, write the failure to a manifest, and continue. Rerun only failed inputs after fixing their specific cause.

Best Value
KODAK Mini 2 Retro 2x3 Portable Photo Printer, 4PASS, 38 Sheets, White
  • Instant Photo Printing: The KODAK Mini 2 Retro is a portable photo printer designed to turn smartphone pictures into high quality prints in seconds. Whether capturing family moments, travel highlights, journaling pages, or creative projects, this mini printer lets you print real photos anytime, anywhere.
  • Genuine 4PASS dye sublimation printing: Each photo is produced in three color layers and finished with a clear protective lamination layer. In approximately 55 seconds, you receive a smooth, detailed print designed to resist fingerprints, water, and fading for long-lasting quality.
  • Easy to Use: Print photos quickly without complicated setup or technical steps. Simply power on, connect wireless bluetooth, and start printing within seconds. The Mini 2 Retro is built for straightforward operation, making it ideal for first time users and everyday photo printing.
  • Print Anytime, Anywhere: Small enough to fit in your hand, bag, or even a pocket, the Mini 2 Retro is built for on-the-go printing. Ideal for parties, trips, school projects, scrapbooks, and spontaneous moments where you want real prints without waiting.
  • KODAK Photo Printer APP: Featuring integrated Bluetooth connectivity, this portable printer connects to compatible iOS and Android devices through the KODAK Photo Printer app. Edit, crop, and customize your photos before printing for creative results.

Fonts differ between machines

Install or package the required fonts in the rendering environment, wait for them to load, and keep the browser/runtime version consistent. Otherwise identical HTML can produce different line breaks and image dimensions.

Remote pages require authentication

Use a Playwright context with the required storage state or headers, while treating credentials as secrets. For a hosted API, confirm its supported authentication, header, cookie, and data-retention behavior before sending private pages.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Practical checklist

  • Classify every input as local HTML or URL and verify asset access.
  • Choose viewport or full-page capture and document viewport dimensions.
  • Choose CSS or device scale intentionally.
  • Set JPEG quality and inspect representative outputs.
  • Use a deterministic, collision-free filename mapping.
  • Wait for page-specific readiness, not an arbitrary universal delay.
  • Log successes and failures independently and close browser resources.
  • Test a small sample before increasing concurrency.
  • For recurring URL jobs, evaluate a hosted renderer’s controls, limits, security, and cost.

Frequently asked questions

Can I convert HTML to JPG without opening a browser?

Not reliably for modern pages. A browser engine is what executes scripts and resolves layout, fonts, and external assets. A service can host that browser for you, but rendering still occurs.

Should I use PNG instead of JPG for text-heavy pages?

This workflow targets JPG because it is widely supported and quality-controlled. If your use case requires lossless text edges or transparency, choose a capture format and API option that explicitly supports those requirements.

How do I process exactly 100 URLs in one request?

ScreenshotNeo documents bulk capture for up to 100 URLs per call. For local Playwright, create a list and apply the per-page screenshot operation to each item.

Are failed screenshots charged by ScreenshotNeo?

ScreenshotNeo states that bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing; the response includes X-Page-Verdict and X-Billed headers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.