margins for printing gtkhtml?

Radek Doulik rodo@ximian.com
11 May 2001 10:23:58 +0200


--=-J83xaeqDqUpaLhgR7pYa
Content-Type: text/plain


Hi Robert!

On 04 May 2001 18:12:57 +1000, Robert Graham Merkel wrote:

> Rodek,
> 
> 	I'm one of the gnucash hackers.  We corresponded 
> a few months ago on issues relating to gtkhtml table display.  We seem
> to have come across another issue and were wondering if you could help, 
> or at least forward it on to the right person?
> 	gtkhtml seems to default to extrordinarily wide margins
> when printing html documents - at least, it does for me and other A4-size
> paper 

This is weird, as gtkhtml uses A4 size. I am not sure what is the
standard way of printing settings like paper size, resolution, ...
Lauris?

So could you please  check, that wide tables aren't some other issue?
GtkHTML printing code is in htmlengine-print.c, where we use GnomePaper
object.

> users.  As gnucash tends to use tables
> that can get rather wide, this is rather restrictive.  
> 
> Is there an existing interface/API that can be used to configure the
> margins
> (and papersize, for this matter)?  If not, how difficult would that be
> to add?

I think it's not very usefull when each library will have its own way of
setting these standard parameter, again Lauris could you please comment
on this?

On the other hand, I am thinking about some more general interface, when
calling application (like GnuCash) gives to GtkHTML GnomePrintContext
and printing area (like x_offset, y_offset, width, height) and then will
call for each page print.

So the interface could look like this:

void     gtk_html_print_begin (GnomePrintContext *pc, gdouble x_off, gdouble y_offset, gdouble width, gdouble height);
/* return value: FALSE - nothing printed, we are on the end of print, TRUE otherwise */
gboolean gtk_html_print_page ();
void     gtk_html_print_end ();

OK, so what do you think?

Cheers
Radek

________________________________________________________________________
Radek Doulik        Hacker  monkey
rodo@ximian.com     Ximian, Inc.

--=-J83xaeqDqUpaLhgR7pYa
Content-Type: text/html; charset=utf-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/0.9.3">
</HEAD>
<BODY><br>
Hi Robert!<br>
<br>
On 04 May 2001 18:12:57 +1000, Robert Graham Merkel wrote:<pre><FONT COLOR="#666666">&gt; Rodek,</FONT>
<FONT COLOR="#666666">&gt; </FONT>
<FONT COLOR="#666666">&gt; 	I'm one of the gnucash hackers.  We corresponded </FONT>
<FONT COLOR="#666666">&gt; a few months ago on issues relating to gtkhtml table display.  We seem</FONT>
<FONT COLOR="#666666">&gt; to have come across another issue and were wondering if you could help, </FONT>
<FONT COLOR="#666666">&gt; or at least forward it on to the right person?</FONT>
<FONT COLOR="#666666">&gt; 	gtkhtml seems to default to extrordinarily wide margins</FONT>
<FONT COLOR="#666666">&gt; when printing html documents - at least, it does for me and other A4-size</FONT>
<FONT COLOR="#666666">&gt; paper </FONT></pre>This is weird, as gtkhtml uses A4 size. I am not sure what is the standard way of printing settings like paper size, resolution, ... Lauris?<br>
<br>
So could you please &nbsp;check, that wide tables aren't some other issue? GtkHTML printing code is in htmlengine-print.c, where we use GnomePaper object.<pre><FONT COLOR="#666666">&gt; users. &nbsp;As gnucash tends to use tables</FONT>
<FONT COLOR="#666666">&gt; that can get rather wide, this is rather restrictive.  </FONT>
<FONT COLOR="#666666">&gt; </FONT>
<FONT COLOR="#666666">&gt; Is there an existing interface/API that can be used to configure the</FONT>
<FONT COLOR="#666666">&gt; margins</FONT>
<FONT COLOR="#666666">&gt; (and papersize, for this matter)?  If not, how difficult would that be</FONT>
<FONT COLOR="#666666">&gt; to add?</FONT></pre>I think it's not very usefull when each library will have its own way of setting these standard parameter, again Lauris could you please comment on this?<br>
<br>
On the other hand, I am thinking about some more general interface, when calling application (like GnuCash) gives to GtkHTML GnomePrintContext and printing area (like x_offset, y_offset, width, height) and then will call for each page print.<br>
<br>
So the interface could look like this:<pre><TT>void &nbsp;&nbsp;&nbsp;&nbsp;gtk_html_print_begin (GnomePrintContext *pc, gdouble x_off, gdouble y_offset, gdouble width, gdouble height);</TT>
<TT>/* return value: FALSE - nothing printed, we are on the end of print, TRUE otherwise */</TT>
<TT>gboolean gtk_html_print_page ();</TT>
<TT>void &nbsp;&nbsp;&nbsp;&nbsp;gtk_html_print_end ();</TT></pre><TT>OK, so what do you think?</TT><br>
<TT></TT><br>
<TT>Cheers</TT><br>
<TT>Radek</TT><br>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>

<HR NOSHADE SIZE="1">
<FONT SIZE="3"><TT>Radek Doulik&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hacker&nbsp;&nbsp;monkey</TT></FONT SIZE="3"><br>
<A HREF="mailto:rodo@ximian.com"><FONT SIZE="3"><TT>rodo@ximian.com</TT></FONT SIZE="3"></A><FONT SIZE="3"><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ximian,&nbsp;Inc.</TT></FONT SIZE="3"></TD>
</TR>
</TABLE>
</BODY>
</HTML>

--=-J83xaeqDqUpaLhgR7pYa--