Re: Gnome2::Print
- From: Cornel Ghiban <green neomedia ro>
- To: Emmanuele Bassi <bassi-e libero it>
- Cc: gtk-perl-list gnome org
- Subject: Re: Gnome2::Print
- Date: Mon, 1 Dec 2003 16:00:37 +0200
Ok.. I found the examples/* (they work very well), but I still can't use
Gnome2::Print. Let's say I have a text, net very long - 30 lines for example,
how can I print this text?
Should I read line by line and moveto(x, y) and then call show()? I guess not.
I found Gnome2::Print::GlyphList but only new() works.. I stil don't know
wheather this is the solution.
Any hint is welcome,
Cornel
On Fri, Nov 28, 2003 at 06:02:03PM +0100, Emmanuele Bassi wrote:
* Cornel Ghiban <green neomedia ro>:
I didn't find any info(API docs) about printing in Gnome.
They are going to be added for the next release.
I tried the small demo in the manual but it didn't happend anything till I added
$job->print;
The code dsiplayed inside the manual is just a "snapshot" of some
plausible code: it should not be considered somewhat "usable", apart
from gaining some clue about how to access some methods/data.
That is why there's the "examples/" directory, which contains a pair of
examples (weird, uh? :-)); the first one (test-print.pl) is pretty much
a simple printing application, that shows ho to call the print dialog,
the preview dialog, and how to operate with the concepts of jobs and
contexts. The second example (basic-font.pl) shows how to use fonts.
I'm planning to port from C to perl the examples that can be found
inside the libraries tarball, but most of those are so simple that are
of no use when building some complex application.
A source of working code could be the "GtkSourceView" project.
GtkSourceView uses libgnomeprint to generate print contexts and print
jobs of the displayed code; it's useful especially in order to know how
to break lines from a textview in order to respect the margin of the
page, instead of the widget's one. Unfortunately, GtkSourceView is
written in C.
A link from the Gnome documentation site is wellcome.
I find the lack of documentation disturbing. Even the usual API is
missing. You should file a bugreport in GNOME BTS for that.
Regards,
Emmanuele.
--
Emmanuele Bassi (Zefram) [ http://digilander.libero.it/ebassi/blog ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738 08BD 8ECC DB8F A432 0FF4
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]