PDF To Kindle

Brandon Rozek

June 14, 2020

This post will outline a process I take in order to get content from a website onto my Kindle.

Suggested Software

sudo apt install weasyprint k2pdfopt calibre

Process

Now I’ll show how we can take the Noise Protocol specification and send it to the Kindle.

First let’s download the page as a PDF

weasyprint https://noiseprotocol.org/noise.html noise.pdf

Then let’s use k2pdfopt to convert the PDF to a more Kindle friendly format,

k2pdfopt noise.pdf -ui- -x

This will produce the file noise_k2opt.pdf, but sadly without the metadata. We can copy that over,

ebook-meta noise.pdf --to-opf temp.opf && \
ebook-meta noise_k2opt.pdf --from-opf temp.opf && \
rm temp.opf

Finally we can convert it to a Kindle friendly file format.

ebook-convert noise_k2opt.pdf noise.azw3

This will give us noise.azw3 which we can then transfer over to the Kindle.