paperback.rs

Back up files on paper.

paperback.rs turns any file into one or more pages of tiny dots, protected by error correction. You print the pages, and years later you scan or photograph them and get the file back — even if parts of the paper are damaged.

What it is

paperback.rs is a command-line port, written in Rust, of PaperBack 1.10 by Oleh Yuschuk. It writes files as error-corrected dot pages (PNG / BMP / PDF) and reads them back from PNG, JPEG, BMP and PDF files — scans or photos, in any order. Pages written by the original open here, and pages written here open in the original: the two programs are interoperable in both directions. Licence: GPL-3.0-or-later.

Install

cargo install paperback-rs-cli

Needs Rust 1.92 or newer. The installed binary is named paperback-rs. The engine is also available as a library crate for your own programs: paperback-rs on crates.io, and the command-line tool at paperback-rs-cli.

Usage

paperback-rs encode report.tar -o page-%03d.png
paperback-rs encode report.tar -o backup.pdf
paperback-rs decode page-*.png -o report.tar
paperback-rs decode backup.pdf > report.tar
paperback-rs decode -v --json scan1.jpg scan2.jpg -o report.tar

Try it in the browser

This decoder runs the actual paperback.rs library as WebAssembly, fully client-side. Drop page images (scans or photos) or a PDF below and get the file back — plus a quality overlay per page. Nothing is uploaded to a server; everything stays in your browser.

Decoder loads on first use (a 2.5 MB download, runs in your browser).

Drop page images or a PDF here — or click to choose files. Nothing leaves your browser.

No pages at hand? Try a sample:

Encode a file to paper

The library also runs the other way round: pick any file and it is turned into printable dot pages right here in your browser, with the modern preset by default (parity blocks instead of the original recovery blocks, filled pages, and the file records with the SHA-256 of the file). Printer presets cover inkjet (the default), laser and pages meant to be read from a camera photo, and the resolution and dot size can be set by hand. The pages keep the gray levels the original program writes, and the PDF is pure black and white because it is made for printing. Nothing is uploaded; the file never leaves your browser.

Pick a file to encode — it never leaves your browser.

Drop a file here — or click to choose one.

one recovery block per 10 data blocks (10 %)
10 %

Pages are laid out with print-safe margins of 12.7 mm (0.5 in) on every side, inside the unprintable edge of ordinary printers. Printer presets: inkjet 300/150 dpi, dots 80 % · laser 600/300 dpi, dots 70 % · camera 150/75 dpi, dots 80 % (printer resolution / dot density). The camera preset is for photographs: the coarse grid (0.34 mm) works with any 12 MP phone when the sheet fills the frame, in even light and with the page flat; the inkjet preset wants a scan at about 600 dpi.

Checking a scan

Every decoded page comes with a quality overlay: the scan with block colours laid over it. Green blocks read cleanly; blocks that needed more and more error correction shade through yellow to orange; red blocks could not be read. The overlay lays the colours over the scan so you can see where the damage is — a dirty spot, a fold, a bad scanner edge. It is shown even when the file cannot be restored, which is when it is most useful: it tells you what to rescan.

Compatibility & status

DirectionPaperBack 1.10PaperBack 1.00
original writes, paperback.rs readsyes, plain and encryptedyes, plain and encrypted (read only)
paperback.rs writes, original readsyes, plain and encryptedplain only

Working: everything above. Not yet: PDFs with mixed one- and two-dimensional fax coding, vector-only PDF pages (there must be an image to read). See the repository documentation for details.

Encryption

The built-in password encryption exists mainly for backward compatibility with the original PaperBack, so old encrypted pages stay readable — the cryptographic code is not audited, so do not treat it as a vault. Prefer encrypting with a secure tool (such as age or gpg) in a pipe first, and use paperback.rs only to put the encrypted bytes on paper:

tar -c documents | age -r age1... | paperback-rs encode - -o backup.pdf