[MacPorts] #32270: pdf2svg makes lines too thick
#32270: pdf2svg makes lines too thick ---------------------------+------------------------------------------------ Reporter: wagle@… | Owner: macports-tickets@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: pdf2svg ---------------------------+------------------------------------------------ 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 -- Ticket URL: <https://trac.macports.org/ticket/32270> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32270: pdf2svg makes lines too thick ---------------------------+------------------------------------------------ Reporter: wagle@… | Owner: macports-tickets@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: pdf2svg ---------------------------+------------------------------------------------ Comment(by wagle@…): PS. I tested my patch, and it now works as before (6-9 months ago). -- Ticket URL: <https://trac.macports.org/ticket/32270#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32270: pdf2svg makes lines too thick ---------------------------+------------------------------------------------ Reporter: wagle@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: pdf2svg ---------------------------+------------------------------------------------ Changes (by ryandesign@…): * priority: High => Normal Old description:
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
New description: 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 }}} -- Comment: Please remember to use WikiFormatting. Has this already been reported to the developers of pdf2svg? -- Ticket URL: <https://trac.macports.org/ticket/32270#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32270: pdf2svg makes lines too thick ---------------------------+------------------------------------------------ Reporter: wagle@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: pdf2svg ---------------------------+------------------------------------------------ Comment(by wagle@…):
Please remember to use WikiFormatting.
Thanks! (The usual thing is to prevent me from editing a submitted bug, and I saw no way to edit it once I saw it was badly formatted.)
Has this already been reported to the developers of pdf2svg?
I asked him about it two weeks ago, and got no response.
priority changed from High to Normal
I rated it high because I was dead in the water without the fix (and others would be), and its trivial to fix once you know what to do. But ok. -- Ticket URL: <https://trac.macports.org/ticket/32270#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32270: pdf2svg makes lines too thick ---------------------------+------------------------------------------------ Reporter: wagle@… | Owner: ryandesign@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: haspatch | Port: pdf2svg ---------------------------+------------------------------------------------ Changes (by ryandesign@…): * keywords: => haspatch * status: new => assigned * owner: macports-tickets@… => ryandesign@… -- Ticket URL: <https://trac.macports.org/ticket/32270#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32270: pdf2svg makes lines too thick ----------------------------+----------------------------------------------- Reporter: wagle@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: fixed | Keywords: haspatch Port: pdf2svg | ----------------------------+----------------------------------------------- Changes (by ryandesign@…): * status: assigned => closed * resolution: => fixed Comment: r94032 -- Ticket URL: <https://trac.macports.org/ticket/32270#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts