[gnome-print] printing a ps or eps file



My app generates graphs in postscript or EPS.  I'd like to offer the
user the chance to print these files via gnome-print, but I'm not sure
how to use gnome-print when the material to print is already in
postscript form.  Any help appreciated.

One other question while I'm at it.  Any idea why Courier 10-point
should come out unusually light or faint when printing via
gnome-print?  It looks rather as if the font used is Courier 12-point
scaled by 5/6 rather than "real" 10-point.  The skeleton of the code
that produces this effect is as follows:

void myprint (const char *buf)
{
    GnomePrinter *printer;
    GnomePrintContext *pc;
    GnomeFont *font;

    printer = gnome_printer_dialog_new_modal();
    if (!printer) return;

    pc = gnome_print_context_new_with_paper_size(printer, "US-Letter");

    gnome_print_beginpage(pc, "my output");

    font = gnome_font_new_closest("Courier", GNOME_FONT_BOOK, 0, 10);
    gnome_print_setfont(pc, font);
    gnome_print_setrgbcolor(pc, 0, 0, 0);

    gnome_print_moveto(pc, some_x, some_y);
    gnome_print_show(pc, buf);
    gnome_print_showpage(pc);
}

-- 
Allin Cottrell
Department of Economics
Wake Forest University, NC





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