Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pdf converter #19

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

harrylepotter
Copy link
Contributor

Hey @Evidlo . Did some mucking about this afternoon. Noticed that a bunch of the images on newseum.org are pretty low resolution. Made a really, really dirty change to enable downloading/resizing of pdfs from the same source. I've never written anything in go before, so go easy on me..

In order to use it, the remarkable needs to have imagemagick and ghostscript installed. I got these off entware, which i noticed you also maintain for the remarkable. The cropping could really be optimized (especially at the top), or possibly using trim on imagemagick would do this magically for most of the pdfs on newseum, at-least..

@Evidlo
Copy link
Owner

Evidlo commented Dec 2, 2020

Did some investigation and it seems like we might be able to use existing /usr/lib/libpdfium.so for rendering a PDF to an image.

https://github.com/Evidlo/go-pdfium-test

I haven't gotten it to work when cross-compiling though.

@harrylepotter
Copy link
Contributor Author

pdfium might be a challenge due to all of the repaging and operations that are taken. Another option might be something like:
https://blog.golang.org/generate or https://github.com/go-bindata/go-bindata, but i have no idea how you'd make this work if you want to maintain x86/non-remarkable build functionality.

@Evidlo
Copy link
Owner

Evidlo commented Dec 17, 2020

but i have no idea how you'd make this work if you want to maintain x86/non-remarkable build functionality

I don't think this is all that important, as testing on the reMarkable is only slightly more inconvenient than testing on desktop. Definitely worth the trade if we can use PDFs as sources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants