RSS/Atom feed Twitter
Site is read-only, email is disabled

printing question

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

printing question cc 28 May 06:47
  printing question Sven Neumann 28 May 08:39
cc
2008-05-28 06:47:12 UTC (almost 17 years ago)

printing question

Hi,

I'm not a GIMP developer, but I do have a GIMP code question to ask.

I know a bit of C, but not enough to save my life. (But willing to learn, of course.)

Since I'm having some printing issues with Gimp 2.4.5 on a Windows Vista machine, and seeing as there are others who have the same problem (as per Bugzilla), I thought I might try a go at figuring it out.

No, I haven't so far as I'm still trying to understand both C and the Gimp code at the same time; however, I did come across a part of the code from :

/trunk/plug-ins/print/print-page-layout.c

As shown below:

static void print_size_info_get_page_dimensions (PrintSizeInfo *info, gdouble *page_width, gdouble *page_height, GtkUnit unit) {
GtkPageSetup *setup;

setup = gtk_print_operation_get_default_page_setup (info->data->operation);

if (info->data->use_full_page) {
*page_width = gtk_page_setup_get_paper_width (setup, unit); *page_height = gtk_page_setup_get_paper_height (setup, unit); }
else
{
*page_width = gtk_page_setup_get_page_width (setup, unit); *page_height = gtk_page_setup_get_page_height (setup, unit); }

}

Can someone point out what's the point of this? As far as I know and see, regardless of whether info->data->use_full_page is true or false, the *page_width and *page_height are set to the same thing. Am I wrong? I see no difference in the code of either conditions. Could this be the reason why all print sizes are ignored?

Currently, whatever is trying to be printed, a whole page of only the top left part is printed. I don't know the precise size of the page, but it certainly isn't what is intended.

Thanks for any clarifications/corrections.

Ed

Sven Neumann
2008-05-28 08:39:00 UTC (almost 17 years ago)

printing question

Hi,

On Wed, 2008-05-28 at 12:47 +0800, cc wrote:

Can someone point out what's the point of this? As far as I know and see, regardless of whether info->data->use_full_page is true or false, the *page_width and *page_height are set to the same thing.

Look again, the code in the if clauses is different. In one case get_paper_width() is used and in the other case it's a call to get_page_width().

If you want to fix bugs in the print code, then it is pretty much pointless to look at the code of the print plug-in. Your problem is almost definitely somewhere in the Win32 backend code of GtkPrint. You will find this code in gtk+.

Sven