Denis Auroux | 16 Dec 2005 06:32
Picon

many questions on gnomeprint/gnomeprintui

Hi,

I'm relatively new to libgnomeprint(ui), so I'm full of questions.
Any answers to the questions below will be highly appreciated... the
first question especially is confusing me a lot, I feel like either
I'm an idiot or the API is completely useless.

On a more general level, is there any good documentation or howto ?
The HTML docs are very deficient, and the howtos I found on the web seem
to all date back to a time when libgnomeprint didn't actually exist yet.
The source code is useful to some extent, but the overall architecture
looks really complicated.

1. Selecting a printer without going through a gnome-print-dialog

I'd like my app to have a "print to PDF" feature that generates a PDF
file with minimal amount of user interaction. I thought I'd go with
a bunch of calls to gnome_print_config_set(...) to start with the default
print config and set some crucial keys such as System.Engine.Backend and
a few others. It turns out this works well at the beginning (while the
default print config is still for a generic uninitialized printer), but
after going through a printout via a gnome-print-dialog the default
print config's tree references a CUPS printer, and I get errors like

** WARNING **: could not set the value of Settings.Engine.Backend, node 
not found

I guess what I actually want to do is modify the "Printer" key to reference
the standard Gnome PDF printer, but I don't see how to do that? (doesn't
that require getting into the gpa structures underlying the GnomePrintConfig
(Continue reading)

Lutz Müller | 17 Dec 2005 12:56
Picon

Re: many questions on gnomeprint/gnomeprintui

On Fri, 2005-12-16 at 00:32 -0500, Denis Auroux wrote:
> On a more general level, is there any good documentation or howto ?
> The HTML docs are very deficient, and the howtos I found on the web seem
> to all date back to a time when libgnomeprint didn't actually exist yet.
> The source code is useful to some extent, but the overall architecture
> looks really complicated.

I look at the source code and other applications using gnome-print. If
you miss something there, just ask.

> 1. Selecting a printer without going through a gnome-print-dialog
> 
> I'd like my app to have a "print to PDF" feature that generates a PDF
> file with minimal amount of user interaction. 

Do you need the gnome-print-dialog for that?

> I've read in the docs that libgnomeprint is supposed to know how to
> render partial transparency even when the underlying devices can't do it.
> All my attempts at rendering partially transparent strokes with 
> 
> gnome_print_setopacity(gpc, 0.5);
> gnome_print_newpath(gpc);
> // a moveto and a sequence of lineto
> gnome_print_stroke(gpc);
> 
> have given completely opaque outputs. (I'm using libgnomeprint 2.10.3,
> let me know if this has been fixed since then). 

I've fixed some issues related to transparency a couple of months ago.
(Continue reading)


Gmane