Sizing differences between print to file and print to page
Amit Chaudhuri
amit.k.chaudhuri at gmail.com
Mon Mar 18 13:20:25 PDT 2013
Hmm.
Inserted
printf("%s: height = %f , width = %f\n",__func__, h, w);
immediately after these two lines in draw_page in print.c.
w = gtk_print_context_get_width(context)/print_params->w_scale;
h = gtk_print_context_get_height(context)/print_params->h_scale;
yielding:
draw_page: height = 3.627638 , width = 3.883858
draw_page: height = 3.814304 , width = 4.008858
..for pdf print and direct to page, respectively.
It looks to me as though gtk determines a different context with different
dimensions when printing to file and printing to A4 page. In both cases my
print dialog shows page size as 297 x 210 mm and scaling = 100%.
A
On Mon, Mar 18, 2013 at 5:14 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> Amit Chaudhuri <amit.k.chaudhuri at gmail.com> writes:
>
> > Hi all,
> >
> > I've noticed something odd when printing to file compared to printing
> > direct to an A4 page using the 6 dives per page setting (but with only 1
> > dive selected). Visually, the print to file is better because it shows
> all
> > 4 borders; the direct to page operation misses the border which runs
> across
> > the top.
>
> This sounds like their is something odd going on with scaling to the
> paper format.
>
> > If I then print for pdf file and superimpose the two it looks as though
> the
> > pdf version is being scaled compared to the other. The right hand border
> > of the image, which is positioned top left, appears to be common but all
> > other external borders are 'further in' on the pdf.
>
> Yeah, that's what I figured.
>
> > Anyone else seeing this (on Linux - openSUSE 12.2)? My Mac seems to be
> > happy printing much closer to the top of the page.
>
> Print formating and sizing is still pretty much black magic as far as
> I'm concerned. You should add some debug print outs as to what sizes we
> get passed in for the print area in both cases...
>
> /D
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130318/f49be72c/attachment.html>
More information about the subsurface
mailing list