Discussion:
[Gimp-print-devel] Using Gutenprint Standalone without CUPS backend like GIMP plugin
C. H.
2017-03-21 07:50:45 UTC
Permalink
Hi,
you might have seen my posts about the problems I have with the Canon Selphy
DS810 printer. However, I was able to get it working with correct color
handling in a special configuration with CUPS in color correction RAW mode
and using the GIMP Gutenprint plugin to preprocess and forward the result
RAW to the CUPS spooler. Printing with CUPS+Gutenprint directly results in
totally wrong colors.

Unfortunately I want to use this printer from a different application and
cannot manually use GIMP here, is there a way of either batch programming
GIMP with a script in order to automatically use the Gutenprint plugin or
is it possible to do the required preprocessing, the plugin is doing
somehow, standalone, for instance on the commandline or something like this.

Thanks in advance for your ideas and support,

Chris
Boris Samorodov
2017-03-21 08:48:42 UTC
Permalink
Post by C. H.
Hi,
you might have seen my posts about the problems I have with the Canon Selphy
DS810 printer. However, I was able to get it working with correct color
handling in a special configuration with CUPS in color correction RAW mode
and using the GIMP Gutenprint plugin to preprocess and forward the result
RAW to the CUPS spooler. Printing with CUPS+Gutenprint directly results in
totally wrong colors.
Unfortunately I want to use this printer from a different application and
cannot manually use GIMP here, is there a way of either batch programming
GIMP with a script in order to automatically use the Gutenprint plugin or
is it possible to do the required preprocessing, the plugin is doing
somehow, standalone, for instance on the commandline or something like this.
Thanks in advance for your ideas and support,
You may create a profile for your printing process, convert image to
printer gamut (ex. cctiff from argyllcms) and print via command line.
--
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
C. H.
2017-03-21 09:17:03 UTC
Permalink
Hi Boris,
thanks for your answer, sounds like a good idea. How could I access the
results of the Gutenprint GIMP Plugin before it forwards the image (if it
is still a image) to the spooler?
From my understanding this would be necessary to get this information in
order to create a profile with argyllcms.

Best,
Chris
​
Boris Samorodov
2017-03-21 09:52:21 UTC
Permalink
Hi Chris,
Post by C. H.
Hi Boris,
thanks for your answer, sounds like a good idea. How could I access the
results of the Gutenprint GIMP Plugin before it forwards the image (if it
is still a image) to the spooler?
From my understanding this would be necessary to get this information in
order to create a profile with argyllcms.
Actually, you asked about command line tools and I meant only that.
As if in "I'm not sure how to use gimp".

In brief, you need to print an image by command line. So, "lpr
<options> <image>" is the command. <options> are your print process
settings. Those options should be used to print a test-chart to create
a printer profile.

Next, convert the initial image from source gamut to target (printer).
And, finally, use the resulting image to print via command line.

You may use convert/montage command line tools (from Imagemagick) to
tweak the initial image as well.

HTH
--
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
Solomon Peachy
2017-03-21 11:39:06 UTC
Permalink
Post by C. H.
thanks for your answer, sounds like a good idea. How could I access the
results of the Gutenprint GIMP Plugin before it forwards the image (if it
is still a image) to the spooler?
You need to perform any color correction *before* you call the gimp
plugin. The output of the plugin is the raw, ready-for-the-printer
data that's beyond any reasonable hope of additional manipulation.

But nearly everything you can do with the gimp plugin you can also do
with the likes of ImageMagick and passing arguments to Gutenprint via
lp/lpr command line arguments.

(And the gimp plugin can run entirely from the command line if so
desired, generating a file you can send to the print spool using
' lpr -o raw')

- Solomon
--
Solomon Peachy pizza at shaftnet dot org
Delray Beach, FL ^^ (email/xmpp) ^^
Quidquid latine dictum sit, altum videtur.
C. H.
2017-03-21 11:46:46 UTC
Permalink
Hi guys,
thanks for your fast answers.

The problem is not like the colors are slightly off or something like this,
the CUPS+Gutenprint is somehow doing something completly wrong, which is
not the case if I pass the raw data generated by the GIMP Gutenprint
plugin. I already tried some pure printer profing without success. I assume
it might be something related to the ink color space, which is CMY for this
printer.

@Solomon
However, running the gimp plugin from entirely from the commandline would
propably solve my issue. I couldn't figure out yet how to do this? Do you
have any references documentation where I can get more information about ?

Best,
Chris


​
Robert Krawitz
2017-03-21 12:33:44 UTC
Permalink
Post by C. H.
The problem is not like the colors are slightly off or something like this,
the CUPS+Gutenprint is somehow doing something completly wrong, which is
not the case if I pass the raw data generated by the GIMP Gutenprint
plugin. I already tried some pure printer profing without success. I assume
it might be something related to the ink color space, which is CMY for this
printer.
That sounds like you're using different settings with the GIMP plugin
than you're using in CUPS (set in the corresponding .ppd file).

Can you send both the PPD file and your ~/.gimp-2.<x>/printrc?
Post by C. H.
@Solomon
However, running the gimp plugin from entirely from the commandline would
propably solve my issue. I couldn't figure out yet how to do this? Do you
have any references documentation where I can get more information about ?
--
Robert Krawitz <***@alum.mit.edu>

*** MIT Engineers A Proud Tradition http://mitathletics.com ***
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
Matt Hirsch
2017-03-21 23:32:02 UTC
Permalink
Chris,

I've been using the gimp plugin to achieve basically what you're asking
for. I've updated the plugin non-interactive mode to make this possible.
The version currently in git master doesn't do custom paper sizes, but I
submitted a patch today to add that feature. (Also note top and left are
swapped in git master). In the patch description you can find a complete
command line that passes a scheme script to the gimp to print with an Epson
aqueous inkjet printer in raw mode. If you're working from git master you
will have to remove the custom paper size. Calling gimp in this way has the
added benefit of allowing me to print much larger files than I could open
in the gimp gui.

https://sourceforge.net/p/gimp-print/bugs/703/

I've also noted that passing the exact same settings through CUPS causes
some type of dithering or corruption in the printed data, which is why I've
gone to the trouble of using the gimp plugin in this way.

By the way, the units in that command are points (1/72 in). You can read
the description of the arguments to the function in the script-fu browser
in gimp. The parameters in the key-value list are driver specific, and you
may have to look at the driver source to know which things to use.

I'd be curious to know if this plugin works for you.

Best,
Matt
Post by C. H.
Post by C. H.
The problem is not like the colors are slightly off or something like
this,
Post by C. H.
the CUPS+Gutenprint is somehow doing something completly wrong, which is
not the case if I pass the raw data generated by the GIMP Gutenprint
plugin. I already tried some pure printer profing without success. I
assume
Post by C. H.
it might be something related to the ink color space, which is CMY for
this
Post by C. H.
printer.
That sounds like you're using different settings with the GIMP plugin
than you're using in CUPS (set in the corresponding .ppd file).
Can you send both the PPD file and your ~/.gimp-2.<x>/printrc?
Post by C. H.
@Solomon
However, running the gimp plugin from entirely from the commandline would
propably solve my issue. I couldn't figure out yet how to do this? Do you
have any references documentation where I can get more information about
?
--
*** MIT Engineers A Proud Tradition http://mitathletics.com ***
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gimp-print-devel mailing list
https://lists.sourceforge.net/lists/listinfo/gimp-print-devel
Christopher Hrabia
2017-03-23 15:39:57 UTC
Permalink
Hi everyone,
Thanks for your feedback. I will check everything at the weekend and will
come back to you after that.

@Robert Where can I find the PPD? I have just used the printer
configuration shipped with CUPS/Gutenprint in a current Debian Testing and
on a Raspberry Pi with Debian Jessy. Should I send these?

Thank you all!

Best,
Christopher
Post by Boris Samorodov
Chris,
I've been using the gimp plugin to achieve basically what you're asking
for. I've updated the plugin non-interactive mode to make this possible.
The version currently in git master doesn't do custom paper sizes, but I
submitted a patch today to add that feature. (Also note top and left are
swapped in git master). In the patch description you can find a complete
command line that passes a scheme script to the gimp to print with an Epson
aqueous inkjet printer in raw mode. If you're working from git master you
will have to remove the custom paper size. Calling gimp in this way has the
added benefit of allowing me to print much larger files than I could open
in the gimp gui.
https://sourceforge.net/p/gimp-print/bugs/703/
I've also noted that passing the exact same settings through CUPS causes
some type of dithering or corruption in the printed data, which is why I've
gone to the trouble of using the gimp plugin in this way.
By the way, the units in that command are points (1/72 in). You can read
the description of the arguments to the function in the script-fu browser
in gimp. The parameters in the key-value list are driver specific, and you
may have to look at the driver source to know which things to use.
I'd be curious to know if this plugin works for you.
Best,
Matt
Post by C. H.
Post by C. H.
The problem is not like the colors are slightly off or something like
this,
Post by C. H.
the CUPS+Gutenprint is somehow doing something completly wrong, which is
not the case if I pass the raw data generated by the GIMP Gutenprint
plugin. I already tried some pure printer profing without success. I
assume
Post by C. H.
it might be something related to the ink color space, which is CMY for
this
Post by C. H.
printer.
That sounds like you're using different settings with the GIMP plugin
than you're using in CUPS (set in the corresponding .ppd file).
Can you send both the PPD file and your ~/.gimp-2.<x>/printrc?
Post by C. H.
@Solomon
However, running the gimp plugin from entirely from the commandline
would
Post by C. H.
propably solve my issue. I couldn't figure out yet how to do this? Do
you
Post by C. H.
have any references documentation where I can get more information
about ?
--
*** MIT Engineers A Proud Tradition http://mitathletics.com ***
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gimp-print-devel mailing list
https://lists.sourceforge.net/lists/listinfo/gimp-print-devel
Emanuele Olivetti
2017-03-23 16:29:26 UTC
Permalink
Hi Christopher,

you should find the PPDs in /etc/cups/ppd/ . Notice that you can easily
customize the PPD of interest on the RPi according to the Gutenprint driver
parameters using the CUPS web interface - even from your laptop - just
browsing at
http://<rpi_ip>:631/printers/
select the Selphy DS810 and then Administration->Set Default Options
(you might need to enable remote administration if you do that from your
laptop, see for example
http://askubuntu.com/questions/23936/how-do-you-administer-cups-remotely-using-the-web-interface
).
Then, printing is just matter of "lpr <filename.jpg/tiff>". I do that on a
regular basis and the only "lpr" option I need to use, if needed, is
lpr -o scaling=95 <filename.jpg/tiff>
just to add a bit of white border to the picture.

Best,

Emanuele
Post by Christopher Hrabia
Hi everyone,
Thanks for your feedback. I will check everything at the weekend and will
come back to you after that.
@Robert Where can I find the PPD? I have just used the printer
configuration shipped with CUPS/Gutenprint in a current Debian Testing and
on a Raspberry Pi with Debian Jessy. Should I send these?
Thank you all!
Best,
Christopher
Post by Boris Samorodov
Chris,
I've been using the gimp plugin to achieve basically what you're asking
for. I've updated the plugin non-interactive mode to make this possible.
The version currently in git master doesn't do custom paper sizes, but I
submitted a patch today to add that feature. (Also note top and left are
swapped in git master). In the patch description you can find a complete
command line that passes a scheme script to the gimp to print with an Epson
aqueous inkjet printer in raw mode. If you're working from git master you
will have to remove the custom paper size. Calling gimp in this way has the
added benefit of allowing me to print much larger files than I could open
in the gimp gui.
https://sourceforge.net/p/gimp-print/bugs/703/
I've also noted that passing the exact same settings through CUPS causes
some type of dithering or corruption in the printed data, which is why I've
gone to the trouble of using the gimp plugin in this way.
By the way, the units in that command are points (1/72 in). You can read
the description of the arguments to the function in the script-fu browser
in gimp. The parameters in the key-value list are driver specific, and you
may have to look at the driver source to know which things to use.
I'd be curious to know if this plugin works for you.
Best,
Matt
Post by C. H.
Post by C. H.
The problem is not like the colors are slightly off or something like
this,
Post by C. H.
the CUPS+Gutenprint is somehow doing something completly wrong, which
is
Post by C. H.
not the case if I pass the raw data generated by the GIMP Gutenprint
plugin. I already tried some pure printer profing without success. I
assume
Post by C. H.
it might be something related to the ink color space, which is CMY for
this
Post by C. H.
printer.
That sounds like you're using different settings with the GIMP plugin
than you're using in CUPS (set in the corresponding .ppd file).
Can you send both the PPD file and your ~/.gimp-2.<x>/printrc?
Post by C. H.
@Solomon
However, running the gimp plugin from entirely from the commandline
would
Post by C. H.
propably solve my issue. I couldn't figure out yet how to do this? Do
you
Post by C. H.
have any references documentation where I can get more information
about ?
--
*** MIT Engineers A Proud Tradition http://mitathletics.com ***
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gimp-print-devel mailing list
https://lists.sourceforge.net/lists/listinfo/gimp-print-devel
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gimp-print-devel mailing list
https://lists.sourceforge.net/lists/listinfo/gimp-print-devel
Christopher Hrabia
2017-03-23 16:37:50 UTC
Permalink
Hi Emanuele,
Thanks for the detailed instructions. I have already used the cups
configuration this way. Is such a customized version saved as a PPD
somewhere as well or is it stored somehow internally in CUPS?

Regards,
Christopher


Am 23.03.2017 5:30 nachm. schrieb "Emanuele Olivetti" <
***@gmail.com>:

Hi Christopher,

you should find the PPDs in /etc/cups/ppd/ . Notice that you can easily
customize the PPD of interest on the RPi according to the Gutenprint driver
parameters using the CUPS web interface - even from your laptop - just
browsing at
http://<rpi_ip>:631/printers/
select the Selphy DS810 and then Administration->Set Default Options
(you might need to enable remote administration if you do that from your
laptop, see for example http://askubuntu.com/questions/23936/how-do-you-
administer-cups-remotely-using-the-web-interface ).
Then, printing is just matter of "lpr <filename.jpg/tiff>". I do that on a
regular basis and the only "lpr" option I need to use, if needed, is
lpr -o scaling=95 <filename.jpg/tiff>
just to add a bit of white border to the picture.

Best,

Emanuele
Post by Christopher Hrabia
Hi everyone,
Thanks for your feedback. I will check everything at the weekend and will
come back to you after that.
@Robert Where can I find the PPD? I have just used the printer
configuration shipped with CUPS/Gutenprint in a current Debian Testing and
on a Raspberry Pi with Debian Jessy. Should I send these?
Thank you all!
Best,
Christopher
Post by Boris Samorodov
Chris,
I've been using the gimp plugin to achieve basically what you're asking
for. I've updated the plugin non-interactive mode to make this possible.
The version currently in git master doesn't do custom paper sizes, but I
submitted a patch today to add that feature. (Also note top and left are
swapped in git master). In the patch description you can find a complete
command line that passes a scheme script to the gimp to print with an Epson
aqueous inkjet printer in raw mode. If you're working from git master you
will have to remove the custom paper size. Calling gimp in this way has the
added benefit of allowing me to print much larger files than I could open
in the gimp gui.
https://sourceforge.net/p/gimp-print/bugs/703/
I've also noted that passing the exact same settings through CUPS causes
some type of dithering or corruption in the printed data, which is why I've
gone to the trouble of using the gimp plugin in this way.
By the way, the units in that command are points (1/72 in). You can read
the description of the arguments to the function in the script-fu browser
in gimp. The parameters in the key-value list are driver specific, and you
may have to look at the driver source to know which things to use.
I'd be curious to know if this plugin works for you.
Best,
Matt
Post by C. H.
Post by C. H.
The problem is not like the colors are slightly off or something like
this,
Post by C. H.
the CUPS+Gutenprint is somehow doing something completly wrong, which
is
Post by C. H.
not the case if I pass the raw data generated by the GIMP Gutenprint
plugin. I already tried some pure printer profing without success. I
assume
Post by C. H.
it might be something related to the ink color space, which is CMY for
this
Post by C. H.
printer.
That sounds like you're using different settings with the GIMP plugin
than you're using in CUPS (set in the corresponding .ppd file).
Can you send both the PPD file and your ~/.gimp-2.<x>/printrc?
Post by C. H.
@Solomon
However, running the gimp plugin from entirely from the commandline
would
Post by C. H.
propably solve my issue. I couldn't figure out yet how to do this? Do
you
Post by C. H.
have any references documentation where I can get more information
about ?
--
*** MIT Engineers A Proud Tradition http://mitathletics.com ***
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gimp-print-devel mailing list
https://lists.sourceforge.net/lists/listinfo/gimp-print-devel
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gimp-print-devel mailing list
https://lists.sourceforge.net/lists/listinfo/gimp-print-devel
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Emanuele Olivetti
2017-03-23 22:26:39 UTC
Permalink
Hi Christopher,

When you change the default options of a printer through the CUPS web
interface, you actually modify the corresponding PPD file in /etc/cups/ppd/
, usually named <printer>.PPD. Of course, in order to set default options
you need administrative rights.
In my case - I print A4 pictures on photographic paper - I freeze the
Gutenprint default options once for all through the web interface. Then I
print just issuing "lpr <pic.jpg/tif>", as said before.
To be more precise, I keep 3 different settings of the (many) Gutenprint
options for my printer, which generically refer to: high photographic
quality, low draft quality, high photographic quality with different paper
setting. These are the three use cases I have. In order to manage that, I
have installed the printer 3 times, under different names (like
"high_quality", "low_quality", "high_matte_paper") and just specify the
printer name to lpr in order to use the setting I like, e.g. "lpr -P
high_quality <file.jpg/tif>".

Hope this helps,

Emanuele
Robert Krawitz
2017-03-26 23:53:05 UTC
Permalink
Post by Matt Hirsch
I've been using the gimp plugin to achieve basically what you're asking
for. I've updated the plugin non-interactive mode to make this possible.
The version currently in git master doesn't do custom paper sizes, but I
submitted a patch today to add that feature. (Also note top and left are
swapped in git master). In the patch description you can find a complete
command line that passes a scheme script to the gimp to print with an Epson
aqueous inkjet printer in raw mode. If you're working from git master you
will have to remove the custom paper size. Calling gimp in this way has the
added benefit of allowing me to print much larger files than I could open
in the gimp gui.
https://sourceforge.net/p/gimp-print/bugs/703/
Matt,

How does this work if the user selects a roll paper (where the page
width is defined by the paper size, but the page height can be
anything within bounds)?
--
Robert Krawitz <***@alum.mit.edu>

*** MIT Engineers A Proud Tradition http://mitathletics.com ***
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
Robert Krawitz
2017-03-21 12:31:26 UTC
Permalink
Post by C. H.
Hi Boris,
thanks for your answer, sounds like a good idea. How could I access the
results of the Gutenprint GIMP Plugin before it forwards the image (if it
is still a image) to the spooler?
The Gutenprint plugin directly generates the raw printer data; it
doesn't generate an image or PDF file. Using the same settings as
those you use with the Gutenprint plugin should give the same results.
Post by C. H.
From my understanding this would be necessary to get this information in
order to create a profile with argyllcms.
--
Robert Krawitz <***@alum.mit.edu>

*** MIT Engineers A Proud Tradition http://mitathletics.com ***
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
Loading...