gen2brain / go-fitz

Golang wrapper for the MuPDF Fitz library
GNU Affero General Public License v3.0
369 stars 87 forks source link

Add ability to pull bounds from page #81

Closed charlesoconor closed 1 year ago

charlesoconor commented 1 year ago

I wanted to have the ability to pull the pdf bounds of the page before converting it over into a png. Sometimes the pages are quite large, depending on how they are generated. The bounds give the ability to guess a suitable dpi before doing the heavy work of converting it over into an image.

I also though about creating another struct for Page since mupdf has its own struct we could pull more methods from but I thought this was the simplest for now since we didn't have to worry about sharing locks.

gen2brain commented 1 year ago

Merged, thanks!