Hmm.. That was REALLY useful information :)

Some more queries :-)

a)
Can the dialog, that asks for the printer-to-be-used, be avoided too?
(Because I just wish to export to PDF, nothing else).


b)
I understand that the page would need to be "drawn" in memory, if we were
to export an image.
However, is that required for a text-document too?


c)
Also, I am still a bit unclear on the backend code.
You mean to say  that *"only"* GTK has the backend code, and Cairo/Pango
are just to handle the drawing part?



On Mon, Oct 22, 2012 at 10:26 PM, Marco Antonio Islas Cruz <
[email protected]> wrote:

>
> 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 -->
>
>
>
>


-- 
Regards,
Ajay
_______________________________________________
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