On Oct 22, 2012, at 11:38 AM, Ajay Garg <[email protected]> wrote:

> Two questions ::
> 
> a)
> I came across the link 
> http://svn.majorsilence.com/pygtknotebook/trunk/examples/printing/printing-example.py,
>  and from what I could infer, it uses GTK backend code for printing. I also 
> noticed that the popup-dialog is inevitable.
> 
> Is my notice (the "inevitablity" of the popup-dialog) true?
it is easy to avoid, just use the gtk. PRINT_OPERATION_ACTION_PRINT action on 
the print opeation,   please take a look a this page[1] is from my blog and 
even when that page is in spanish the code is pretty easy to read.
> 
> 
> b)
> Also, the cairo/pango you are talking about has a different backend code?
Cairo is the interface you have to use to draw, no matter if you are drawing a 
new widget, or using a gtk.Drawable or something, it relies on Cairo, before 
you print you'll have to "draw" your page.
Pango is the interface to handle fonts, and will be required for you if you 
want to use pretty fonts the easy way.

Note that after the draw, I use PrintOperation to create the printing 
operation, and the PrintOperation.set_export_filename() to export it to PDF.

[1]http://islascruz.org/html/index.php/blog/show/Imprimir-a-un-archivo-PDF-usando-GTK.html

Cheers

Marco Antonio Islas Cruz
[email protected]
[email protected]
<-- linux because I'm free -->



_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to