Summary: | 0 width lines are too wide when printing | ||
---|---|---|---|
Product: | poppler | Reporter: | Adrian Johnson <ajohnson> |
Component: | cairo backend | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | patch to fix the bug |
Description
Adrian Johnson
2011-07-08 04:56:47 UTC
Created attachment 48891 [details] [review] patch to fix the bug Patch to fix this bug. It sets 0 width lines to be 1/600 inch wide when printing. Review of attachment 48891 [details] [review]: Do you have to assume the DPI? Is there any API for querying it? (In reply to comment #2) > Do you have to assume the DPI? Is there any API for querying it? CUPS provides API for getting the printer DPI. But using this would require adding API to the glib frontend to set the DPI and the application would need to obtain the DPI from CUPS and call the glib API to set the DPI. But this is over complicating a simple bug fix and we would still need to provide a sensible default for the cases when the application did not provide a DPI or when printing to a generic PDF/PS file or printing without CUPS. Is cairo_surface_get_fallback_resolution() a possible option here? I'm not very familiar with cairo, but I'm assuming that cairo knows the resolution of whatever its drawing to. (In reply to comment #4) > Is cairo_surface_get_fallback_resolution() a possible option here? > > I'm not very familiar with cairo, but I'm assuming that cairo knows the > resolution of whatever its drawing to. Cairo does not know the resolution of the printers because it does not interact directly with printers. It simply outputs a device independent PS or PDF file. The problem with using the cairo fallback resolution to obtain the width of zero width lines is the fallback resolution is intended for use with images. Gtk+ sets the fallback resolution using the halftone screen frequency obtained from the PPD file via CUPS. For example on my printer in 600dpi mode the number of half tone cells per inch is 106. Not much different to the 72dpi currently assumed by CairoOutputDev for zero width lines and still too thick to correctly print the test case. Pushed to git master, thank you very much. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.