gtk_print
- From: "Richard Boaz" <riboaz xs4all nl>
- To: gtk-list gnome org
- Subject: gtk_print
- Date: Thu, 21 Aug 2008 13:07:15 +0200 (CEST)
On Tue, Aug 19, 2008 at 3:41 PM, Chris Vine <chris cvine freeserve co uk>
wrote:
On Tue, 19 Aug 2008 10:47:54 +0200 (CEST)
"Richard Boaz" <riboaz xs4all nl> wrote:
> Hi,
>
> The documentation for gtk_print states that once the user is finished
> with gtk_print_operation_run(), the "::draw-page" signal will be
> emitted. This signal is then to be caught by the program, using Cairo
> to render to the GtkPrintContext.
>
> Except that I have a Postscript file that needs to be sent to the
> printer.
>
> Does this mean that I cannot use the GtkPrint functionality?;
> specifically, the dialog showing the available printers and allowing
> the user to select one of them to send the Postscript file to?
or if you are using Unix you could use the
GtkPrintJob/GtkPrintUnixDialog interface to send the postscript file
directly to the underlying print system (cups or lpr) - see
gtk_print_job_set_source_file().
Unfortunately, this needs to work on W32 platform as well, so the
UNIX-specific solution won't work for me.
You can draw the postscript file to the cairo surface in the ordinary
way using GtkPrintOperation,
I'm confused. The example for the draw-page signal renders to the cairo
print context using cairo commands. How do I take a postscript file and
"draw" it to this cairo print context (in the ordinary way)?
I've looked at the GTK+ and Cairo documentation and see only functions
that are uni-directional, i.e., Cairo -> Postscript. Are there functions
that go the other direction, PS -> Cairo?
Or am I missing something completely obvious?
thanks,
richard
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]