diff --git a/poppler/Page.cc b/poppler/Page.cc index a4af340..153587e 100644 --- a/poppler/Page.cc +++ b/poppler/Page.cc @@ -43,6 +43,7 @@ #include #include +#include #include "GlobalParams.h" #include "Object.h" #include "Array.h" @@ -554,6 +555,10 @@ Gfx *Page::createGfx(OutputDev *out, double hDPI, double vDPI, if (!crop) { crop = (box == *cropBox) && out->needClipToCropBox(); } + box.x1 = ceil(box.x1 * 10000000000) / 10000000000; + box.x2 = ceil(box.x2 * 10000000000) / 10000000000; + box.y1 = ceil(box.y1 * 10000000000) / 10000000000; + box.y2 = ceil(box.y2 * 10000000000) / 10000000000; gfx = new Gfx(doc, out, num, attrs->getResourceDict(), hDPI, vDPI, &box, crop ? cropBox : (PDFRectangle *)NULL, rotate, abortCheckCbk, abortCheckCbkData, xrefA);