[pygtk] Custom paper size

Dieter Verfaillie dieterv at optionexplicit.be
Thu Mar 4 02:49:46 WST 2010


Quoting "Joel Juvenal Rivera Rivera" <joelriv at gmail.com>:
> Hello,
> I hope somebody could help me with this...
>
> when I do:
>  paper = gtk.PaperSize()
>  paper.set_size(216,140,gtk.UNIT_MM)
>
> raise this warning:
>  GtkWarning: gtk_paper_size_set_size: assertion `size->is_custom' failed
>
> And the size of the paper remains unchanged.

You could try the following to create a custom paper size:
>>> paper = gtk.paper_size_new_custom('newcustom',  
>>> 'new_custom_papersize', 216, 140, gtk.UNIT_MM)
>>> paper.is_custom()
True

Regards,
Dieter


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the pygtk mailing list