Skip to main content

No project description provided

Project description

Kindle2PDF and PDF2Remarkable

Introduction

A Python script to render your Kindle books as PDFs without needing a device. This is ideal if you want to read them on a reMarkable tablet or similar.

A script is also provided to upload the PDFs to the reMarkable Cloud, which is particularly useful on Linux as the official desktop application is not available.

Installation

pip install kindle2pdf

Usage

First you need to login to https://read.amazon.com/. The Python script will automatically retreive any cookies it needs. Then, assuming you own the book with the ASIN B0182LFAIA, you can run the following command:

kindle2pdf B0182LFAIA

If the book is only available in a specific country, use the --region flag to specify it:

kindle2pdf B0182LFAIA --region co.uk

To find out the ASIN of any book, you can either inspect the URL of the book in the Kindle Cloud Reader, or search for it in Amazon. You'll need to make sure that it corresponds to the edition that you own.

By default, the PDF includes selectable/searchable text as well as rendered glyphs. To omit the text layer (faster rendering but not searchable or copyable), pass --exclude-text. It is also possible to include only the text and not render the glyphs with --exclude-glyphs; this results in a smaller PDF file, but it may not display correctly in all viewers.

You can also download a free sample (approximately 5% of the book) without owning the book or being logged in by passing --sample.

kindle2pdf --sample B0182LFAIA

If you want to upload a PDF to the reMarkable Cloud you can add the switch --remarkable to kindle2pdf or simply

pdf2remarkable "The Cybergypsies.pdf"

The first time you run this, you will be asked to pair your device. Just follow the instructions and paste your OTC.

Troubleshooting

  • Book <ASIN> is not available for download (ContentUnsupported). Some books can only be read on the Kindle web / desktop app; if you are unable to open the book on https://read.amazon.com, then you will not be able to download it. In principle, it should be possible to extend kindle2pdf to cater for these cases, but it would be quite involved. If you are interested in undertaking this challenge then please open a Pull Request or reach out to me.

  • If you get a "Permission denied" error when running kindle2pdf on Windows, try closing any Chrome browsers.

  • If you have any other problems with cookies in spite of having logged in to https://read.amazon.com, please check https://github.com/borisbabic/browser_cookie3/issues.

  • If you have authentication problems with pdf2remarkable or want to re-pair your device, delete the .pdf2remarkable file in your home directory and run the script again.

  • Otherwise, if you run into what looks to be a bug, you can run kindle2pdf with --save-mock and create an issue with a link to your responses.jsonl for debugging purposes. Any sensitive IDs or persistent tokens will have been removed. Please also give details of your Operating System.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kindle2pdf-0.7.2.tar.gz (6.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kindle2pdf-0.7.2-py3-none-any.whl (6.7 MB view details)

Uploaded Python 3

File details

Details for the file kindle2pdf-0.7.2.tar.gz.

File metadata

  • Download URL: kindle2pdf-0.7.2.tar.gz
  • Upload date:
  • Size: 6.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.9 Linux/6.17.0-22-generic

File hashes

Hashes for kindle2pdf-0.7.2.tar.gz
Algorithm Hash digest
SHA256 6c92fb9c4cdcfaf140858794dca5fd805bece004870fbca9b653b35e80ed2733
MD5 61133edd595d61ee2cee1b52e3746ad7
BLAKE2b-256 b8fde0429062e086153168f8d89cab0fa7ce867d612efb6a015da352a0ea4738

See more details on using hashes here.

File details

Details for the file kindle2pdf-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: kindle2pdf-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.9 Linux/6.17.0-22-generic

File hashes

Hashes for kindle2pdf-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 149326fda4479a51e31562da4a5321a5e5ce6755d921ef783498ae9b3c54518b
MD5 50202d9a43f4ad58fad33d2d27963509
BLAKE2b-256 4d30fcd52ce30af8685d380d6253cf4f8e1ccdf3ce4c411e39dc82dcc769307d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page