Opened 13 years ago

Last modified 12 years ago

#32270 closed defect

pdf2svg makes lines too thick — at Version 3

Reported by: wagle@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: haspatch Cc:
Port: pdf2svg

Description (last modified by ryandesign (Ryan Carsten Schmidt))

pdf2svg is using the wrong call to poppler..

lines now come out with a thickness of 1 instead of 0.398. according to the irc channel:

<wagle> if pdf2svg uses poppler, and now draws lines too thick compared to 6-9 months ago, is poppler the one at fault?  The lines used to be 0.398 thick, are now 1
<adrianj> wagle: pdf2svg should be calling poppler_page_render_for_printing() instead of poppler_page_render(). The former is for use with cairo vector surfaces. The latter for image surfaces.
<adrianj> The stroke adjust feature will cause lines < 1 wide to be adjusted to 1 pixel wide but only for image surfaces.

here's the patch:

$ diff -Naur pdf2svg.c.ORIG pdf2svg.c
--- pdf2svg.c.ORIG      2008-02-01 10:28:35.000000000 -0800
+++ pdf2svg.c   2011-11-26 03:56:15.000000000 -0800
@@ -65,7 +65,7 @@
     drawcontext = cairo_create(surface);
 
     // Render the PDF file into the SVG file
-    poppler_page_render(page, drawcontext);
+    poppler_page_render_for_printing(page, drawcontext);
     cairo_show_page(drawcontext);
 
     // Close the SVG file

Change History (3)

comment:1 Changed 13 years ago by wagle@…

PS. I tested my patch, and it now works as before (6-9 months ago).

comment:2 Changed 13 years ago by wagle@…

Cc: wagle@… removed

Cc Me!

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Priority: HighNormal

Please remember to use WikiFormatting.

Has this already been reported to the developers of pdf2svg?

Note: See TracTickets for help on using tickets.