Skip to content

Extract the thumbnails of a PDF file and arrange them into a grid.

Notifications You must be signed in to change notification settings

lionelblonde/gridify-thumbs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Gridify Thumbnails from PDF

What does it do. Extract the thumbnails of a PDF file and arrange them into a grid.
Why though. Useful in research paper highlights to enable the reader to see the overall structure and content of the paper from a quick glance without leaving the page.

Hyperparameters. The number of pages to be extacted as thumbnails from the PDF, the dimensions of the grid as well as the final image resolution are all configurable.

Code inspired from Andrej Karpathy's Arxiv Sanity Preserver code.

Example usage

In order to extract a 6-column grid of thumbnails from the first 11 pages of the given PDF file my_file.pdf, with a resolution of 100 DPI, use the following command:

python gridify_thumbs.py \
    --pdf=my_file.pdf \
    --npages=11 \
    --ncols=6 \
    --dpi=100

For this example, we take the "Gotta Learn Fast: A New Benchmark for Generalization in RL" paper from Nichol et al. as PDF file.

The resulting thumbnail grid:

About

Extract the thumbnails of a PDF file and arrange them into a grid.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages