|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
many questions on gnomeprint/gnomeprintuiHi,
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 structure, which are private and hence inaccessible to my code ?) Or else, should I try to create a GnomePrintConfig from an XML description of what I want? (using gnome_print_config_from_string()). If so, is there a relatively version-independent way of doing it ? (I see that the XML tree dump contains lots of version info; in addition, I may want to keep a lot of the system's default settings and only modify the choice of printer rather than also set a paper size and all that). 2. Transparency ? 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). Is that normal ? Is there any way to get around it ? 3. Print preview completely broken ? As far as I can tell, gnome-print-job-preview isn't stable at all (at least in version 2.10.1 of libgnomeprintui -- I haven't checked the latest version, but anyway I want my app to work with the libraries that people typically already have on their machines, if at all possible). For example one can cut pages until there are no pages left and then everything crashes, and that's just one of many examples. Is there a trimmed-down version of gnome-print-job-preview which doesn't offer any of the unstable editing "features"? Why isn't there an option to set how much bells-and-whistles one wants the preview to have ? Even worse, the preview widget doesn't seem to export any of its user interface elements publicly, and I was hoping for a cleaner method than scanning through the successive GtkContainers of the interface to hide all the faulty buttons... (which doesn't disable the drag-and-drop of pages, nor the keyboard shortcuts, so it's not a good solution at all). 4. Inserting EPS or PDF fragments If I know for sure that I'm rendering to a PS or PDF printer, is there any way of inserting EPS or PDF fragments into the output ? (or maybe there's a more appropriate library for manipulating PS and PDF in C ? I agree that it's not clear at all why this should be libgnomeprint's business). Thanks in advance! (and sorry if some of my questions are stupid). Denis. _______________________________________________ gnome-print-list mailing list gnome-print-list@... http://mail.gnome.org/mailman/listinfo/gnome-print-list |
|
|
Re: many questions on gnomeprint/gnomeprintuiOn 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'd try the latest version. > As far as I can tell, gnome-print-job-preview isn't stable at all (at least > in version 2.10.1 of libgnomeprintui -- I haven't checked the latest > version, but anyway I want my app to work with the libraries that people > typically already have on their machines, if at all possible). For example > one can cut pages until there are no pages left and then everything crashes, > and that's just one of many examples. Could you list them? Like that, I'll be able to fix the bugs one after another. > Is there a trimmed-down version of gnome-print-job-preview which doesn't > offer any of the unstable editing "features"? Not yet. gedit needs one, but as it probably involves changing the API... > Why isn't there an option > to set how much bells-and-whistles one wants the preview to have ? Because no one has worked on it yet. > 4. Inserting EPS or PDF fragments > > If I know for sure that I'm rendering to a PS or PDF printer, is there > any way of inserting EPS or PDF fragments into the output ? No. Either use libgnomeprint's API or generate the PS/PDF-file outside libgnomeprint. Or (as always) propose a patch. Regards -- Lutz Müller <lutz@...> _______________________________________________ gnome-print-list mailing list gnome-print-list@... http://mail.gnome.org/mailman/listinfo/gnome-print-list |
| Free embeddable forum powered by Nabble | Forum Help |