This repository will automate the process of saving snapshots of highlighted content within multiple pdf files.
- pip install -r requirements
- Run snapshot_ext.py
I devised the solution from the following pages of the documentation:
- Tutorial page for introduction to the fitz liabrary
- page.searchFor to solve the return type for searchFor method
- fitz.Rect to identify what the returned objects from page.searchFor
- fitz.Point to provide parameters to create a cropping box around the highlighted content
- Collection of Recipes page to implement cropping, saving and working with images as spnapshots
Installing the requirements will automatically install all dependencies. Make sure you install the requirements before running the code. Also note that this requires Python 3.6+.