Re: gnome_print_config_set GNOME_PRINT_KEY_ORIENTATION
- From: Jody Goldberg <jody gnome org>
- To: Hubert Sokolowski <h sokolowski wsisiz edu pl>
- Cc: gnome-devel-list gnome org
- Subject: Re: gnome_print_config_set GNOME_PRINT_KEY_ORIENTATION
- Date: Fri, 29 Apr 2005 16:12:25 -0400
On Fri, Apr 22, 2005 at 02:07:08PM +0200, Hubert Sokolowski wrote:
>
>
> Hi!
>
> this is my first post on this list. I am writing a gtk application that is
> using gtkhtml3 and prints a html page.
>
> I try to print a html page using gtkhtml3's function gtk_html_print.
> I want it to be printed in landscape orientation (rotated by 90 degrees)
> so the page looks like that
> +--------------+
> | text here |
> | |
> | |
> +--------------+
>
> I use this code but that does not work, the page is printed in portrait
> orientation, just the text is moved down to the half of a paper.
>
> GnomePrintContext *pc;
> GnomePrintConfig *cfg;
>
> cfg = gnome_print_config_default ();
> if (!gnome_print_config_set (cfg, GNOME_PRINT_KEY_ORIENTATION,
> "R90"))
> log ("could not set config");
> gnome_print_config_set (cfg, "Printer", "PDF");
> gnome_print_config_set (cfg, GNOME_PRINT_KEY_OUTPUT_FILENAME,
> "/tmp/page.pdf");
> pc = gnome_print_context_new (cfg);
> gtk_html_print ((GtkHTML*) view, pc);
>
> I use libgnomeprint 2.10.3
>
> Anyone has a clue why this code does not work as expected?
Set the printer before setting anything else.
There is a design bug in libgnomeprint such that the printer defines
all the settings. If the printer is changed, all previous changes
are lost.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]