I always run into this problem when cropping the page and I want to know if there is any way to get the page bounding limit exactly.
ValueError: Bounding box (Decimal('55.256'), Decimal('0'), Decimal('541.199'), Decimal('550.669')) is not fully within parent page bounding box (Decimal('55.256'), Decimal('34.985'), Decimal('541.199'), Decimal('550.669'))
as shown above, the top of the cropping bounding box is 0, this 0 value is replaced from the min value I got from page.chars is less than 0. It obviously makes no sense. Sometimes this replacing strategy works fine, but sometimes it would throw me this error. which the limit of top is not 0.
I tried within_bbox but it persists, is there a better solution? Thank you.
I always run into this problem when cropping the page and I want to know if there is any way to get the page bounding limit exactly.
as shown above, the
top
of the cropping bounding box is 0, this 0 value is replaced from themin
value I got frompage.chars
is less than 0. It obviously makes no sense. Sometimes this replacing strategy works fine, but sometimes it would throw me this error. which the limit oftop
is not 0.I tried
within_bbox
but it persists, is there a better solution? Thank you.