Bitmap-type print to printer and preview produces low resolution output

Bug #258916 reported by Oldřich Jedlička
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Unassigned
inkscape (Debian)
Fix Released
Unknown
inkscape (Ubuntu)
Fix Released
Low
Bryce Harrington

Bug Description

The printing dialog provides two possible formats: Vector and Bitmap. When I select Bitmap and enter 600 DPI, the DPI is not used neither in "Print to file", nor when I select my printer "hp_3650" (and of course when I select "600 dpi, Photo, Photo + Color Cartr., Photo Paper" on Advanced tab). The generated PDF (in "Print to file") is very low resolution (75 DPI?); also when the output goes directly to the printer, it is very low resolution.

It looks like the print surface has wrong resolution (some default?). I saw cairo_surface_set_fallback_resolution() function used somewhere on the internet, but it is not used in Inkscape.

SW versions (packages from Gentoo Linux):

Inkscape: 0.46-r3
gtk+: 2.12.11
gtkmm: 2.12.7
cairo: 1.6.4
cairomm: 1.6.0
hplip (printer drivers): 2.8.6b

Tags: printing

Related branches

Revision history for this message
Oldřich Jedlička (oldium) wrote :
Revision history for this message
Oldřich Jedlička (oldium) wrote :

After some investigation I discovered the intermediate PNG file has wrong resolution. It is problem in src/ui/dialogs/print.cpp in draw_page() method:

  sp_export_png_file(junk->_doc, tmp_png.c_str(), 0.0, 0.0, width, height, (unsigned long)(width * PT_PER_IN / PX_PER_IN), (unsigned long)(height * PT_PER_IN / PX_PER_IN), dpi, dpi, bgcolor, NULL, NULL, true, NULL);

The generated PNG file is in PT_PER_IN resolution: 72 DPI! But when I change PT_PER_IN to "dpi", the generated temporary PNG looks good (at least for me), but the PDF contains zoomed-in picture - looks like it doesn't use the PNG's DPI (600), but forces it to use 72 DPI again (I don't know how to check the size of the picture in the PDF to verify this), so the resulting PNG's size in PDF is 8 times (600/72) bigger than the page.

Some hints?

Revision history for this message
Niko Kiirala (kiirala) wrote :

Fix for this is committed as SVN revision 19909. With this, I successfully printed a bunch of images containing blur, gradients and such, at 300 dpi.

Changed in inkscape:
importance: Undecided → Medium
status: New → Fix Released
Revision history for this message
Olivier Samyn (olivier-oleastre) wrote :

Porting this fix to the future intrepid release is trivial and will save some paper ;-)

Bryce Harrington (bryce)
Changed in inkscape (Ubuntu):
assignee: nobody → bryceharrington
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Olivier Samyn (olivier-oleastre) wrote :
Revision history for this message
Bryce Harrington (bryce) wrote :

Ah, thanks good catch

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package inkscape - 0.46-5ubuntu3

---------------
inkscape (0.46-5ubuntu3) jaunty; urgency=low

  * Add 102_sp_pattern_painter_free.dpatch: Fix SIGSEGV in
    sp_pattern_painter_free that occurs when drawing gears and creating 3d
    boxes.
    (LP: #198608)
  * Add 103_bitmap_type_print.dpatch: Bitmap-type print to printer and
    preview produces low resolution output.
    (LP: #258916)

 -- Bryce Harrington <email address hidden> Wed, 08 Apr 2009 00:35:13 -0700

Changed in inkscape (Ubuntu):
status: Triaged → Fix Released
Changed in inkscape (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.