r18720 - gnucash/trunk/src/html - Fix bug 591177: Printer font is too small to read with webkit as html renderer.

Geert Janssens janssens-geert at telenet.be
Wed Feb 24 15:05:55 EST 2010


On Wednesday 24 February 2010, Phil Longstaff wrote:
> Author: plongstaff
> Date: 2010-02-24 14:44:11 -0500 (Wed, 24 Feb 2010)
> New Revision: 18720
> Trac: http://svn.gnucash.org/trac/changeset/18720
> 
> Modified:
>    gnucash/trunk/src/html/gnc-html-webkit.c
> Log:
> Fix bug 591177: Printer font is too small to read with webkit as html
>  renderer.
> 
> From comment 23:
> "The PDF in comment 2 is about 8 times smaller than it should be. One
>  possible cause of this bug is if gtk_print_operation_set_unit (op,
>  GTK_UNIT_POINTS) is not called. gtkprint defaults to GTK_UNIT_PIXEL - a
>  useless unit to be using with printers.
> 
> On Linux GTK_UNIT_PIXEL units are 1 unit = 1/72 inch (the same as
>  GTK_UNIT_POINTS as well as PostScript and PDF units). On Windows
>  GTK_UNIT_PIXEL units are the GDI device units which for printers is the
>  dpi resolution. So for a 600dpi printer 1 unit is 1/600".
> 
> If the application was developed on Linux and assumes the default gtkprint
>  units are always 1/72" inch the output on Windows using a 600dpi printer
>  will be 72/600 = 0.12 of the size (or approximately 1/8 of the size)."
> 
> Solution was to use webkit_web_frame_print_full() which allows us to
>  provide our own GtkPrintOperation object with units set to
>  GTK_UNIT_POINTS.  Tested on both Linux and Windows.
> 
> 
> _______________________________________________
> gnucash-patches mailing list
> gnucash-patches at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches
> 
Whoohoo ! This is great.

We now have both the old and the new report renderer back in shape for 
windows. But I'm looking forward mostly to the webkit based one and the 
possibility to prettify the reports.

Thanks Phil for your work in this area.

Geert


More information about the gnucash-devel mailing list