Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Speed up thumbnail generation for PDFs #399

Merged

Conversation

jat255
Copy link
Contributor

@jat255 jat255 commented Sep 5, 2018

Since we only use the first page of the PDF for thumbnail generation, the current method of converting the entire pdf to a series of .png images is wasteful, and can bog down the consumer if dealing with a very long (page-wise) PDF.

This PR uses the convert bracket syntax to load only the first page, and get the thumbnail from that instead of doing all the pages.

@danielquinn
Copy link
Collaborator

This is a simple, and super-handy improvement! Thanks!

@danielquinn danielquinn merged commit 46cbd10 into the-paperless-project:master Sep 9, 2018
@jat255 jat255 deleted the ENH_convert_only_one_page branch September 10, 2018 01:49
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants