Skip to content

Instantly share code, notes, and snippets.

@pesterhazy
Last active October 2, 2022 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pesterhazy/2919933f22bcbc7696dd95ad54322733 to your computer and use it in GitHub Desktop.
Save pesterhazy/2919933f22bcbc7696dd95ad54322733 to your computer and use it in GitHub Desktop.
Print web pages to PDF for readability

It's often desirable to print articles or blog posts to PDF for easier reading. In fact you're almost always better off reading a cleaned-up printout than a noisy HTML page on a backlit screen.

Printing the web without all the noise

Why?

Offline reading has fewer distractions; you can mark up the article with your own notes; and it's easier on the eyes. Active reading, underlinding and annotating improves comprehension and retention. If you read on the reMarkable tablet, as I do, then you don't to print to actual paper and save trees.

If an article is worth reading, it's worth printing and reading with a pen in your hand.

Why not just Cmd-P in Chrome?

Chrome's Print-to-PDF function works well. But many websites don't offer good print CSS styles. Often, the text is obscured by popups.

Option 1: Firefox's Reader View

Firefox comes with a little-known feature called Reader View.

When it works it does the job well. Unfortunately, the toolbar icon doesn't appear for all pages. For example, Substack newsletters don't seem to be supported.

Plus I don't use Firefox normally.

Option 2: Printfriendly.com

Printfriendly is a server-side service that takes any web page and extracts only the human-readable elements from it.

This does a good job most of the time. Unfortunately, it doesn't work for servies behind a paywal.

Option 3: Simple Print

Simple Print lays out blog posts and articles in a two-column layout, similar to a journal article. This makes the resulting PDF easy to read.

It doesn't support paywalled content.

Option 4: Reader Mode (readermode.io)

Reader Mode is a Chrome extension that offers the required functionality to remove clutter and obstructing overlays from web sites.

Note that you need to use the little printer icon in Reader-Mode-specific UI, rather than Chrome's built-in Cmd-P command - otherwise the print preview may spin indefinitely or show up empty.

The company behind readermode.io also offers a Premium version, which allows you store articles in cloud and find text via full-text search. Because it's a browser extension, Reader Mode works for paywalled web pages like Substack.

Summary

Currently Reader Mode (readermode.io) is the best option.

Advice for specific sites

Below are recommendations for printing specific sites with interesting content

Github

Github READMEs and other markdown-generated documents are already nicely formatted. All you need to do is to remove the surrounding UI. This bookmarklet does the job:

javascript:void function(){b=document.body,c=document.querySelector("article"),b.innerHTML="",b.appendChild(c)}();

It even works for this gist!

Twitter threads / Tweetstorms

Twitter threads are notoriously hard to read. To make them printable, go to Thread Reader and paste in the Twitter URL. (Don't do "@threadreaderapp unroll", that adds more noise for others.)

The resulting page can be printed (here's an example). It's better to run the page through Reader Mode to remove irrelevant noise.

Thread Reader also offers a premium plan that generates PDFs for you.

Substack

As of August 2022, Substack can only printed readably with Reader Mode.

Medium

Reader Mode does a good job of making Medium posts more readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment