Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

Convert Indian Ecommerce Product URLs to PDF with Python Playwright

A practical Python Playwright guide to saving accessible Indian ecommerce product pages as PDFs with headless Chromium, including rendering choices and troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Playwright’s Python library to open the product page in headless Chromium, then call page.pdf(). The method works for pages you can access, but retailer-specific consent banners, login walls, bot checks and loading behavior can affect the result. Playwright’s PDF output uses print CSS by default and is supported only in headless Chromium.

Install Playwright and its browser

The Python package and browser binaries are separate installation steps. In a terminal, run:

  1. python -m pip install playwright
  2. python -m playwright install chromium

This installs the Chromium browser needed for PDF generation. Playwright’s setup guide documents the package-and-browser installation workflow: Playwright Python getting started.

Convert a product URL to PDF

Replace the example URL with a product page you are authorized to access. Save the following as save_product.py, then run python save_product.py.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
from playwright.sync_api import sync_playwright

url = "https://example.in/product"

with sync_playwright() as p:
    browser = p.chromium.launch()
    try:
        page = browser.new_page()
        page.goto(url, wait_until="networkidle")
        page.pdf(path="product.pdf", format="A4", print_background=True)
    finally:
        browser.close()

The PDF is written to product.pdf in the current working directory. The Playwright Page API documents page.pdf() and the headless Chromium constraint: Python Page API reference. The example is a general pattern, not a retailer-tested script; check the output against the particular product page you need.

#1 Best Overall
Sale
Epson Workforce ES-50 Compact & Lightweight Mobile Document Scanner
  • PORTABLE SCANNER FOR USE ON-THE-GO — The fastest and lightest mobile single-sheet-fed compact document scanner in its class¹
  • QUICK DOCUMENT SCANNING ― This Epson ultra-fast scanner scans a single page as quickly as 5.5 seconds²; Windows and Mac compatible
  • VERSATILE PAPER HANDLING ― Portable scanner scans documents up to 8.5 x 72 in; Also easily digitizes receipts and ID cards to make accounting, bookkeeping, and organizing simpler
  • INTUITIVE, HIGH-SPEED SOFTWARE — Epson ScanSmart Software³ is a smart tool allowing you to easily scan, review, and save; Stay organized easily with the help of this Epson scanner
  • EASY SETUP — USB-powered connect to your computer for quick and simple scanning; No batteries or external power supply required to operate portable document scanner; Standard Connectivity: USB 2.0

Choose print or screen styling

Print CSS (default)

page.pdf() renders using print CSS media by default. This can produce a more printer-friendly layout, but a site’s print styles may hide navigation, change layout or omit elements. The official API description confirms print media is the default.

Screen CSS

If the print layout is unsuitable and you want the page’s screen styles, set screen media before generating the PDF:

Rank #2
Sale
Brother DS-640 Compact Mobile Document Scanner, (Model: DS640)
  • FAST SPEEDS - Scans color and black and white documents a blazing speed up to 16ppm (1). Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • ULTRA COMPACT – At less than 1 foot in length and only about 1. 5lbs in weight you can fit this device virtually anywhere (a bag, a purse, even a pocket).
  • READY WHENEVER YOU ARE – The DS-640 mobile scanner is powered via an included micro USB 3. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan.
  • WORKS YOUR WAY – Use the Brother free iPrint&Scan desktop app for scanning to multiple “Scan-to” destinations like PC, Network, cloud services, Email and OCR. (2) Supports Windows, Mac and Linux and TWAIN/WIA for PC/ICA for Mac/SANE drivers. (3)
  • OPTIMIZE IMAGES AND TEXT – Automatic color detection/adjustment, image rotation (PC only), bleed through prevention/background removal, text enhancement, color drop to enhance scans. Software suite includes document management and OCR software. (4)
page.emulate_media(media="screen")
page.pdf(path="product.pdf", format="A4", print_background=True)

Print output can alter colors. The Playwright API reference points to the CSS property -webkit-print-color-adjust for exact color rendering. Where you control the page’s CSS, a rule such as print-color-adjust: exact (with the WebKit-prefixed property where needed) can help preserve colors; a third-party retailer page may not let you change its styles.

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

Adjust the PDF to your use

  • Paper: format="A4" selects A4 paper. A product page may flow across multiple pages; inspect the PDF to see whether important content is split awkwardly.
  • Backgrounds: print_background=True includes background graphics that print output might otherwise omit. It does not guarantee identical screen colors.
  • Wait condition: wait_until="networkidle" waits for network activity to settle, but it is not a universal signal that all product content or lazy-loaded images are ready. Validate it for the target site; some pages may keep network requests active or populate content later.
  • Content access: The script does not sign in, accept consent, or bypass a bot check. If access requires a user session or interaction, handle it only in ways permitted by the site and your authorization.

Playwright supports Chromium, Firefox and WebKit for browser automation generally, but PDF generation through page.pdf() is documented only for headless Chromium. See the Playwright browsers guide.

Rank #3
Sale
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
  • STAY ORGANIZED – Easily convert your paper documents into digital formats like searchable PDF files, JPEGs, and more.Power Consumption : 2.5W or less (Energy Saving Mode: 0.7W). Suggested Daily Volume : 500 scans..Does it contain liquid: no
  • CONVENIENT AND PORTABLE –lightweight and small in size, you can take the scanner anywhere from home offices, classrooms, remote offices, and anywhere in between
  • HANDLES VARIOUS MEDIA TYPES – Digitize receipts, business cards, plastic or embossed cards, reports, legal documents, and more
  • FAST AND EFFICIENT – No technical hurdles or complicated setups here; easily scan both sides of a document at the same time, in color or black-and-white, at up to 12 pages-per-minute, and with a 20 sheet automatic feeder
  • BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer

Troubleshoot common problems

  • Browser executable missing: Install the browser binaries with python -m playwright install chromium, then run the script again.
  • Navigation times out or never reaches network idle: The site may keep requests open or load content dynamically. Try a different readiness strategy appropriate to the page, such as waiting for a product title selector or a short delay, and verify the PDF rather than assuming the page is complete.
  • PDF is blank, incomplete or shows a challenge: The retailer may require consent, authentication or additional loading, or may restrict automated access. Check the page in a normal browser and follow the retailer’s rules; Playwright does not grant access rights.
  • Images are missing: Product images may load lazily or after the initial navigation. Scroll the page or wait for the relevant image/content selector before calling page.pdf(), then inspect the result.
  • Colors or layout differ from the browser: PDF generation uses print media by default. Try page.emulate_media(media="screen"); background inclusion is controlled separately with print_background=True.
  • Browser process remains after an error: Keep browser shutdown in a finally block, as in the example, so exceptions during navigation or PDF creation do not skip cleanup.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. Its one-call endpoint can return an image or PDF; for this workflow, request PDF output using the API’s documented parameters. The example below is a basic request pattern, with the URL and key to replace as appropriate:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.in/product -o product.pdf

See the ScreenshotNeo API documentation for PDF options and response handling. ScreenshotNeo accepts cookie/consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads and cache hits are not billed. Its MCP server provides screenshot and PDF tools for AI agents. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.

Sign up free for 1,000 screenshots a month—no card required.

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.
Rank #4
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
  • IRIScan Express, portable scanner : scans color and black and white documents a blazing speed up to 8ppm simplex. Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • IRIScan Express mobile scanner is powered via an included micro USB 2. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan. USB cable provided. AC Adapter not provided and not needed.
  • IRIScan flatbed scanner uses a simplex scanning mode allows for quick and straightforward scanning of single-sided documents. IRIScan with its full portable features is the ideal document scanners for computers.
  • IRIScan document scanner : Versatile scanning capabilities, including scanning to Word, PDF, and Excel formats with companion software provided Readiris OCR
  • Receipt scanner and card scanner with Additional features include scanning business cards directly to Outlook, photo scanning, and receipt scanning for efficient document management
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Access and sharing considerations

Use this workflow only for pages you are permitted to access. Review the retailer’s applicable terms and consider copyright and privacy before distributing a captured product page. Automating a browser does not establish permission to access or reuse the page.

Frequently Asked Questions

Can I generate the PDF with Playwright Firefox or WebKit?

No. Playwright documents PDF generation through page.pdf() as supported only in headless Chromium.

Best Value
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
  • Scanner type: Document
  • Connectivity technology: USB
  • With Auto Scan Mode, the scanner automatically detects what you're scanning
  • Digitize documents and images

Where does the PDF file go?

It is saved at the path passed to page.pdf(); the example’s product.pdf is relative to the directory where you run the script.

Quick Recap

SaleBestseller No. 3
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer; This product is not intended for scanning photographs on photo paper / photographic media
$153.00
Bestseller No. 4
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
Find our Software here : irislink.com/start; IRIScan Express is only compatible Windows platform and not macintosh
$129.00
Bestseller No. 5
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
Scanner type: Document; Connectivity technology: USB; With Auto Scan Mode, the scanner automatically detects what you're scanning
$75.00

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.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.