Re: How to pass file to gnome_print?



On Don, 2005-03-17 at 14:17 +0530, Mohit Kumar wrote:
> So does this mean, that an application cannot use gnome print dialog
> to print the contents of its files?
> Say I am writing a text editor and I use my special file format but I
> can convert into PS and then send it using gnome print dialog to the
> printer?
> Do I need to create my own print dialog in this case?
> Moreover then what is the scenario for usage of gnome print dialog....
> 
> I am sorry if I am missing something, but its not clear to me......
> Also there is this function:
> #ifdef GNOME_PRINT_UNSTABLE_API
> void     gnome_print_job_set_file (GnomePrintJob *job, gchar *input);
> #endif
> which used to let me set the file to print FROM.

It's possible to print postscript files using libgnomeprint(ui) with
gnome_print_job_set_file but AFAIK there are some caveats like no print
preview. You can't directly print PDF files using that function but
poppler/xpdf is able to convert pdf to postscript.

You may want to look at the sources of evince or gpdf as they use the
aforementioned function to print. 

HTH,

Jürg
-- 
Jürg Billeter <j bitron ch>




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