From 4cb3af830a9c9e0612cd48feaec44490c345d5a3 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 5 Jul 2019 17:20:12 +0100 Subject: Add our own method for determining the bounding box I found some pdfs where pdfcrop/ghostscript determined the bounding box incorrectly. With this commit we introduce a simple way to determine the bounding box by finding the smallest rectangle that is completely surrounded by white pixels. This will work well for most PDFs. The centering functionality is also improved, and now correctly centers the PDF on the reMarkable both vertically and horizontally. --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'pyproject.toml') diff --git a/pyproject.toml b/pyproject.toml index 2c28224..a211300 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ license = "MIT" python = "^3.5" bs4 = "^0.0.1" requests = "^2.21" +pdfplumber = "^0.5.12" [tool.poetry.dev-dependencies] -- cgit v1.2.3