rmrl icon indicating copy to clipboard operation
rmrl copied to clipboard

Look for base page dimensions in parent of parent in merge_pages

Open ttrine opened this issue 3 years ago • 0 comments

Hi rschroll,

I'm using your library in my project and it's very useful, thanks!

This PR fixes a small issue I encountered when running this library on a few of my PDFs. I can tell by your existing comments that finding the base page dimensions is a bit of a pain point. I was able to resolve a majority of error cases I was seeing by looking for the dimensions in the parent of the parent if necessary.

If it still can't find them, I throw an exception that describes what's going on, to avoid the less-than-helpful "'NoneType' object is not iterable" that it's throwing currently.

ttrine avatar Jun 14 '21 22:06 ttrine