discard bbox with zero area

pull/30/head
Qingping Hou 11 years ago
parent 4ccf5a57e3
commit f12ff20c37

@ -165,7 +165,8 @@ This method returns pagesize if bbox is corrupted
function Document:getUsedBBoxDimensions(pageno, zoom, rotation)
local bbox = self:getPageBBox(pageno)
local ubbox_dimen = nil
if bbox.x0 < 0 or bbox.y0 < 0 or bbox.x1 < 0 or bbox.y1 < 0 then
if (bbox.x0 < 0) or (bbox.y0 < 0) or (bbox.x1 < 0) or (bbox.y1 < 0)
or (bbox.x0 == bbox.x1) or (bbox.y0 == bbox.y1) then
-- if document's bbox info is corrupted, we use the page size
ubbox_dimen = self:getPageDimensions(pageno, zoom, rotation)
else

Loading…
Cancel
Save