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

Trouble with printing GERMAN gimp 2.0

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.

4 of 6 messages available
Toggle history

Please log in to manage your subscriptions.

200403140840.22435.fgroups@... 07 Oct 20:22
  Trouble with printing GERMAN gimp 2.0 Robert L Krawitz 14 Mar 16:53
   Trouble with printing GERMAN gimp 2.0 Sven Neumann 14 Mar 17:26
    Trouble with printing GERMAN gimp 2.0 Robert L Krawitz 14 Mar 19:23
4054B60E.7020601@gmx.net 07 Oct 20:22
  Trouble with printing GERMAN gimp 2.0 Robert L Krawitz 15 Mar 02:58
Robert L Krawitz
2004-03-14 16:53:26 UTC (over 20 years ago)

Trouble with printing GERMAN gimp 2.0

From: Frank Noack
Date: Sun, 14 Mar 2004 08:40:22 +0100

I have any trouble with printing the new gimp2.0(pre4). It works fine if i use LANG=en. But if i use LANG=de_DE@euro i cant print with using the ppd file. If i dont use the ppd file it works. I use Suse 8.2 with recompiled ghostcript 7.07.1rc1 and gimpprint 4.2.6 gimp 2.0pre4
Cups with Turboprint
The gimp developer says they will release in the next time the gimp 2.0rc but its not good if the printing not works. If i read the release note from gimp-print all says we only support gimp 1.2 not higher. When you supports gimp 1.3 or 2.0?

Please try this patch to src/main/print-ps.c. It resets the locale around all potentially risky operations, although it may turn out to be too big of a hammer. We had to do something similar to the IJS driver.

We'll need to do something similar in the 5.0 line.

Index: print-ps.c =================================================================== RCS file: /cvsroot/gimp-print/print/src/main/print-ps.c,v retrieving revision 1.26.2.5
diff -u -r1.26.2.5 print-ps.c
--- print-ps.c 30 Apr 2003 00:21:55 -0000 1.26.2.5 +++ print-ps.c 14 Mar 2004 15:42:05 -0000 @@ -72,10 +72,10 @@
*/

static stp_param_t * /* O - Parameter values */ -ps_parameters(const stp_printer_t printer, /* I - Printer model */ - const char *ppd_file, /* I - PPD file (not used) */ - const char *name, /* I - Name of parameter */ - int *count) /* O - Number of values */ +ps_parameters_internal(const stp_printer_t printer, /* I - Printer model */ + const char *ppd_file, /* I - PPD file (not used) */ + const char *name, /* I - Name of parameter */ + int *count) /* O - Number of values */ {
int i;
char line[1024],
@@ -165,10 +165,23 @@
return (valptrs);
}

+static stp_param_t * /* O - Parameter values */ +ps_parameters(const stp_printer_t printer, /* I - Printer model */ + const char *ppd_file, /* I - PPD file (not used) */ + const char *name, /* I - Name of parameter */ + int *count) /* O - Number of values */ +{
+ stp_param_t *answer;
+ setlocale(LC_ALL, "C");
+ answer = ps_parameters_internal(printer, ppd_file, name, count); + setlocale(LC_ALL, "");
+ return answer;
+}
+
static const char *
-ps_default_parameters(const stp_printer_t printer, - const char *ppd_file, - const char *name) +ps_default_parameters_internal(const stp_printer_t printer, + const char *ppd_file, + const char *name) {
int i;
char line[1024],
@@ -237,16 +250,27 @@
return NULL;
}

+static const char *
+ps_default_parameters(const stp_printer_t printer, + const char *ppd_file, + const char *name) +{
+ const char *answer;
+ setlocale(LC_ALL, "C");
+ answer = ps_default_parameters_internal(printer, ppd_file, name); + setlocale(LC_ALL, "");
+ return answer;
+}

/*
* 'ps_media_size()' - Return the size of the page. */

static void
-ps_media_size(const stp_printer_t printer, /* I - Printer model */ - const stp_vars_t v, /* I */ - int *width, /* O - Width in points */ - int *height) /* O - Height in points */ +ps_media_size_internal(const stp_printer_t printer, /* I - Printer model */ + const stp_vars_t v, /* I */ + int *width, /* O - Width in points */ + int *height) /* O - Height in points */ {
char *dimensions; /* Dimensions of media size */
@@ -264,18 +288,28 @@
stp_default_media_size(printer, v, width, height); }

+static void
+ps_media_size(const stp_printer_t printer, /* I - Printer model */ + const stp_vars_t v, /* I */ + int *width, /* O - Width in points */ + int *height) /* O - Height in points */ +{
+ setlocale(LC_ALL, "C");
+ ps_media_size_internal(printer, v, width, height); + setlocale(LC_ALL, "");
+}

/*
* 'ps_imageable_area()' - Return the imageable area of the page. */

static void
-ps_imageable_area(const stp_printer_t printer, /* I - Printer model */ - const stp_vars_t v, /* I */ - int *left, /* O - Left position in points */ - int *right, /* O - Right position in points */ - int *bottom, /* O - Bottom position in points */ - int *top) /* O - Top position in points */ +ps_imageable_area_internal(const stp_printer_t printer, /* I - Printer model */ + const stp_vars_t v, /* I */ + int *left, /* O - Left position in points */ + int *right, /* O - Right position in points */ + int *bottom, /* O - Bottom position in points */ + int *top) /* O - Top position in points */ {
char *area; /* Imageable area of media */ float fleft, /* Floating point versions */ @@ -310,6 +344,19 @@
}

static void
+ps_imageable_area(const stp_printer_t printer, /* I - Printer model */ + const stp_vars_t v, /* I */ + int *left, /* O - Left position in points */ + int *right, /* O - Right position in points */ + int *bottom, /* O - Bottom position in points */ + int *top) /* O - Top position in points */ +{
+ setlocale(LC_ALL, "C");
+ ps_imageable_area_internal(printer, v, left, right, bottom, top); + setlocale(LC_ALL, "");
+}
+
+static void
ps_limit(const stp_printer_t printer, /* I - Printer model */ const stp_vars_t v, /* I */ int *width,
@@ -327,8 +374,8 @@
* This is really bogus...
*/
static void
-ps_describe_resolution(const stp_printer_t printer, - const char *resolution, int *x, int *y) +ps_describe_resolution_internal(const stp_printer_t printer, + const char *resolution, int *x, int *y) {
*x = -1;
*y = -1;
@@ -336,14 +383,23 @@
return;
}

+static void
+ps_describe_resolution(const stp_printer_t printer, + const char *resolution, int *x, int *y) +{
+ setlocale(LC_ALL, "C");
+ ps_describe_resolution_internal(printer, resolution, x, y); + setlocale(LC_ALL, "");
+}
+
/*
* 'ps_print()' - Print an image to a PostScript printer. */

static void
-ps_print(const stp_printer_t printer, /* I - Model (Level 1 or 2) */ - stp_image_t *image, /* I - Image to print */ - const stp_vars_t v)
+ps_print_internal(const stp_printer_t printer, /* I - Model (Level 1 or 2) */ + stp_image_t *image, /* I - Image to print */ + const stp_vars_t v) {
unsigned char *cmap = stp_get_cmap(v); int model = stp_printer_get_model(printer); @@ -693,6 +749,16 @@
stp_free_vars(nv);
}

+static void
+ps_print(const stp_printer_t printer, /* I - Model (Level 1 or 2) */ + stp_image_t *image, /* I - Image to print */ + const stp_vars_t v)
+{
+ setlocale(LC_ALL, "C");
+ ps_print_internal(printer, image, v); + setlocale(LC_ALL, "");
+}
+

/*
* 'ps_hex()' - Print binary data as a series of hexadecimal numbers.

Sven Neumann
2004-03-14 17:26:05 UTC (over 20 years ago)

Trouble with printing GERMAN gimp 2.0

Hi,

Robert L Krawitz writes:

Please try this patch to src/main/print-ps.c. It resets the locale around all potentially risky operations, although it may turn out to be too big of a hammer. We had to do something similar to the IJS driver.

Is there a particular reason this patch sets LC_ALL instead of LC_NUMERIC? The latter should be less invasive but sufficient to solve the problem.

Sven

Robert L Krawitz
2004-03-14 19:23:29 UTC (over 20 years ago)

Trouble with printing GERMAN gimp 2.0

From: Sven Neumann
Date: 14 Mar 2004 17:26:05 +0100

Robert L Krawitz writes:

> Please try this patch to src/main/print-ps.c. It resets the locale > around all potentially risky operations, although it may turn out to > be too big of a hammer. We had to do something similar to the IJS > driver.

Is there a particular reason this patch sets LC_ALL instead of LC_NUMERIC? The latter should be less invasive but sufficient to solve the problem.

It appears that Till Kamppeter identified the issue and applied the patch in question. Till, why the choice of LC_ALL?

Robert L Krawitz
2004-03-15 02:58:22 UTC (over 20 years ago)

Trouble with printing GERMAN gimp 2.0

Date: Sun, 14 Mar 2004 19:44:14 +0000 From: Till Kamppeter

Robert L Krawitz wrote: > From: Sven Neumann
> Date: 14 Mar 2004 17:26:05 +0100 >
> Robert L Krawitz writes:
>
> > Please try this patch to src/main/print-ps.c. It resets the locale > > around all potentially risky operations, although it may turn out to > > be too big of a hammer. We had to do something similar to the IJS > > driver.
>
> Is there a particular reason this patch sets LC_ALL instead of > LC_NUMERIC? The latter should be less invasive but sufficient to solve > the problem.
>
> It appears that Till Kamppeter identified the issue and applied the > patch in question. Till, why the choice of LC_ALL?

What I discovered was that the problem in the IJS interface was the decimal "," instead of a "." (I don't remember abny other problems with the locale stuff). So LC_NUMERIC should work. I don´t really know why I have used LC_ALL. But test it to be absolutely sure.

I'm willing to make that change in 5.0 if there's anyone around to test it thoroughly (I don't use the IJS driver myself). As for the Postscript driver in both 4.2 and 5.0, Frank needs to test my patch. If that solves his problem, I'll certainly put it in 4.2.7.

I don't think 4.2.7 will be out in time for the GIMP 2.0 release, based on the timeline I'm seeing. We're gated by an OS X issue. I think that everything else we need is already in (other than this one problem that Frank reported).