Re: [Gnome-print] Problem with gnome-print-multipage



HI!
A bigger problem I think to close the printcontext without enough pages. Let's assume we
wanna print some matrics for envelopes from an sql table (like in my case). So for example we
have 33 pages on the paper (3x11) and we have a query for 30 pages.. If we do
gnome-print-context close it won't print correctly the pages as we were closing print context
without final showpage...
I add the following code to my application to workout this problem...

while (pp->pageno/(pp->virt_x*pp->virt_y)!=(double)pp->pageno/(double)(pp->virt_x*pp->virt_y))
{
gnome_print_beginpage(pc,"Page");
gnome_print_showpage(pc);
pp->pageno++;
}

It works for me but maybe it will be better if multipage handles it....
Hello!

I could not imagine anyone wanting to print more than 64 pages
onto single sheet. In which case we would lose some microseconds ;)

But to seem a little smarter in CS than I actually am, I already did 
prepend/reverse stuff ;)

Best wishes,
Lauris Kaplinski

On Thu, 2001-10-04 at 19:37, Jody Goldberg wrote:
> On Thu, Oct 04, 2001 at 06:29:11PM +0200, Lauris Kaplinski wrote:
> > >   for (;affines;affines=affines->next)
> > >   {
> > >     affine = g_new(gdouble, 6);
> > >     memcpy(affine, affines->data, sizeof(gdouble) * 6);
> > >     list = g_list_append(list,affine);
> > >   }
> 
> How big is the affine list expected to be ?  g_list_append is an
> O(n) operation.  I prefer to use  g_list_prepend (O(1)) with a
> single g_list_reverse afterwards (O(n)).  The loss of clarity is
> defensible if the list is non trivial.
> 
> _______________________________________________
> Gnome-print maillist  -  Gnome-print@ximian.com
> http://lists.ximian.com/mailman/listinfo/gnome-print





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]