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

Help with batch printing please?

This discussion is connected to the gimp-user-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.

Help with batch printing please? Simon Roberts 16 Apr 20:22
  Help with batch printing please? Alan Horkan 17 Apr 01:25
Simon Roberts
2006-04-16 20:22:44 UTC (about 18 years ago)

Help with batch printing please?

Hi All,

I'd like to be able to have gimp print something from a command line, so I can use it in a batch job.

Well, to back up a little, I guess what I want is to be able to print high quality graphics from a command-line but so far, the only thing I have that I'm aware of that does this on my Epson R200 printer is the GIMP.

What I'm trying to do is create a script to do it, but the docs seem a little thin (maybe I'm missing something). Anyway, I found something about script-fu, and tried to work from that. What I have doesn't work, and I don't seem to be able to find useful error messages (the console, after it fails, doesn't say anything helpful).

So, if anyone can suggest any or all of: 1) how do I debug this? 2) where can I find more information on scripting and 3) maybe tell me what is wrong with this, or what other command line utility I should use, I'd be very grateful.

Here's the non-working script: (define (gimp-batch-print filename)
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image))))

(file_print_gimp RUN-NONINTERACTIVE image drawable "EpsonR200" "EpsonR200" raw 1 "1440 x 720 DPI Highest Quality" "Photo Quality Inkjet Paper"8 "Standard"
100.0 100.0 -1 -1 -1 1.0 1.0 1.0 1.0 1.0 0 2 100.0 100.0 "Six Color Photo"
"Adaptive Hybrid"
0)

(gimp-image-delete image)))

Which I put in my scripts directory and tried to run with: gimp -b gimp-batch-print ~/color.gif

TIA! Cheers,
Simon

"You can tell whether a man is clever by his answers. You can tell whether a man is wise by his questions." ? Naguib Mahfouz

___

Alan Horkan
2006-04-17 01:25:23 UTC (about 18 years ago)

Help with batch printing please?

On Sun, 16 Apr 2006, Simon Roberts wrote:

Date: Sun, 16 Apr 2006 11:22:44 -0700 (PDT) From: Simon Roberts
To: gimp-user@lists.xcf.berkeley.edu Subject: [Gimp-user] Help with batch printing please?

Hi All,

I'd like to be able to have gimp print something from a command line, so I can use it in a batch job.

Well, to back up a little, I guess what I want is to be able to print high quality graphics from a command-line but so far, the only thing I have that I'm aware of that does this on my Epson R200 printer is the GIMP.

What I'm trying to do is create a script to do it, but the docs seem a little thin (maybe I'm missing something). Anyway, I found something about script-fu, and tried to work from that. What I have doesn't work, and I don't seem to be able to find useful error messages (the console, after it fails, doesn't say anything helpful).

would still be worth including in your message ...

So, if anyone can suggest any or all of: 1) how do I debug this? 2) where can I find more information on scripting and 3) maybe tell me what is wrong with this, or what other command line utility I should use, I'd be very grateful.

possibly use ImageMagick instead, it is designed for batch processing but I'd expect this to be possible

Here's the non-working script:
(define (gimp-batch-print filename)
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))

For starters you would need to define a value for RUN-NONINTERACTIVE somewhere, set it as 0 1 depending on what you want.

I found that really confusing and quite unclear when writeing my first scripts. I'd recommend hard coding everything and then cleanup the script once you have something which actually works (you probably do not really need to fill in any of those text strings for example).

(drawable (car (gimp-image-get-active-layer image))))

(file_print_gimp RUN-NONINTERACTIVE image drawable "EpsonR200" "EpsonR200" raw 1 "1440 x 720 DPI Highest Quality" "Photo Quality Inkjet Paper"8

at the end of the line you have an extra 8, that doens't look right, I'd at least expect a space after the quoted string

"Standard"
100.0 100.0 -1 -1 -1 1.0 1.0 1.0 1.0 1.0 0 2 100.0 100.0 "Six Color Photo"
"Adaptive Hybrid"
0)

(gimp-image-delete image)))

Which I put in my scripts directory and tried to run with: gimp -b gimp-batch-print ~/color.gif

I assume you have stepped through the process manulaly and have the necessary gif and printer support setup.

Hope that helps