
Why Ctrl+P is broken — and how I built a Chrome extension to fix it
If you've ever tried to save a web article as a PDF, you know the pain. You hit Ctrl+P , and Chrome hands you a document with: The site's sticky navbar repeated on every page A cookie consent banner covering the first paragraph Ads wedged between paragraphs Lazy-loaded images rendered as blank rectangles An "article" that's 40% sidebar widgets and related links I save 10-20 articles a day for research — policy documents, legal analyses, long-form journalism. After months of manually cleaning up garbage PDFs and uploading them to Google Drive, I decided to build something better. The problem is deeper than it looks My first instinct was to write a Python script with BeautifulSoup. Find the article container, strip the junk, pipe it through WeasyPrint, upload to Drive. Simple, right? It wasn't. Every site uses different class names for their article body — .article-body , .post-content , .entry-content , .story-body — and that's just the English-language sites. I wrote 30+ selectors and
Continue reading on Dev.to Webdev
Opens in a new tab

