From 41407669b0ee2fc6d752f541c2f4a759f97721ed Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Fri, 8 Jul 2011 21:13:36 +0930 Subject: [PATCH] cairo: assume printer pixel size is 1/600" when stroking 0 width lines --- poppler/CairoOutputDev.cc | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc index 477030a..d39ba90 100644 --- a/poppler/CairoOutputDev.cc +++ b/poppler/CairoOutputDev.cc @@ -408,6 +408,11 @@ void CairoOutputDev::updateLineWidth(GfxState *state) { /* find out how big pixels (device unit) are in the x and y directions * choose the smaller of the two as our line width */ double x = 1.0, y = 1.0; + if (printing) { + // assume printer pixel size is 1/600 inch + x = 72.0/600; + y = 72.0/600; + } cairo_device_to_user_distance(cairo, &x, &y); cairo_set_line_width (cairo, MIN(fabs(x),fabs(y))); } else { -- 1.7.4.1