I have some GIF and JPG files (they're maps of wine producing areas in France) that I want to print. What's the easiest application to use to do this? All I want is for the image to be scaled to the best size to fit a sheet of A4 paper, no other manipulation is required.
When I just opened the file from the xfce file manager using the default application it opened with ImageMagick, it looked perfect on screen but when I selected print the printout was displaced so that only half of it was printed. The orientation was right, it was just shifted down. I couldn't find any way to set up the printout in ImageMagick. I'm not even sure what sort of ImageMagick is being invoked - almost as bad as Windows!
Then I tried opening the file with the Gimp and printing it, even more disastrous, the Gimp did its own thing and simply sent Postscript to the printer and thus produced nothing useful at all except lots of wasted paper. My printers seem to be set up right for everything else on my Linux box, why did the Gimp not get that right?
I have many Gnome and KDE applications installed even though I use xfce for my desktop so I probably have most of the usual things people might suggest.
The message 20050630201420.GA8048@areti.co.uk from Chris Green chris@areti.co.uk contains these words:
I have some GIF and JPG files (they're maps of wine producing areas in France) that I want to print. What's the easiest application to use to do this? All I want is for the image to be scaled to the best size to fit a sheet of A4 paper, no other manipulation is required.
When I just opened the file from the xfce file manager using the default application it opened with ImageMagick, it looked perfect on screen but when I selected print the printout was displaced so that only half of it was printed. The orientation was right, it was just shifted down. I couldn't find any way to set up the printout in ImageMagick. I'm not even sure what sort of ImageMagick is being invoked - almost as bad as Windows!
Then I tried opening the file with the Gimp and printing it, even more disastrous, the Gimp did its own thing and simply sent Postscript to the printer and thus produced nothing useful at all except lots of wasted paper. My printers seem to be set up right for everything else on my Linux box, why did the Gimp not get that right?
Most graphics programs these days have a similar layout to functions: look at 'Image' on the toolbar and there should be a 'Resize' option.
With some printers there's a preview option, and the chance of altering the margins to expand or compress the picture. (I can do that with my Epson Stylus Color 600, for instance, but I couldn't give you an off-the-cuff resumé of all the steps, but you will want to chose 'Properties' and 'Advanced' options, or whatever corresponds with those 9n your printer.)
On 30-Jun-05 Anthony Anson wrote:
The message 20050630201420.GA8048@areti.co.uk from Chris Green chris@areti.co.uk contains these words:
I have some GIF and JPG files (they're maps of wine producing areas in France) that I want to print. What's the easiest application to use to do this? All I want is for the image to be scaled to the best size to fit a sheet of A4 paper, no other manipulation is required.
When I just opened the file from the xfce file manager using the default application it opened with ImageMagick, it looked perfect on screen but when I selected print the printout was displaced so that only half of it was printed. The orientation was right, it was just shifted down. I couldn't find any way to set up the printout in ImageMagick. I'm not even sure what sort of ImageMagick is being invoked - almost as bad as Windows!
I'm going to chip in with an ancient but effective suggestion, in the old Unix tradition of getting Linux to work for you.
1. You have ImageMagick, Chris, so you have 'convert', so:
convert yourimage.gif yourimage.eps
2. Prepare a text file "myprint.tr" with contents
.LP .PSPIC yourimage.eps 6i
3. Run
groff -Tps -ms myprint.tr > myprint.ps
4. You then have a PostScript file "myprint.ps" which you can view with
gv myprint.ps
and, if satisfied:
5. Print this by whatever means you use to print PS files.
The setup of "myprint.tr" will give you the image centred on the page, at the top of the printing area (with a 1-inch header margin) and 6 inches wide.
a) To change the width, alter the "6i" in the ".PSPIC" line.
b) To change the vertical placement:
-- To move it further down the page, change the text to
.LP .sp 2.5i .PSPIC yourimage.eps 6i
which will move it down 2.5 inches.
-- To move it further up, decrease the Header Margin, e.g.
.nr HM 0.6i .LP .PSPIC yourimage.eps 6i
which, instead of a default 1-inch header Marging will give you 0.6i (i.e. 0.4i furtherup the page).
Tune things as above until you are satisfied (testing with the 'gv' viewer).
You can generalise the above with a script, e.g. "printscript":
#! /bin/bash NAME=$1 TYPE=$2 WID=$3 VMOVE=$4 if ! [ -e $NAME.eps ] ; then convert $NAME.$TYPE $NAME.eps ; fi groff -Tps -ms - > $NAME.ps << EOT .nr HM 1i+$VMOVE .LP .PSPIC $NAME.eps $WID EOT
and run it as (e.g.)
printscript yourimage gif 5i -0.5i
which would generate the PostScript file "yourimage.ps" containing the graphic "yourimage.gif" centred, 5 inches wide, and moved up 0.5 inches relative to a Header Margin of 1 inch.
If you view the first run with
gv -watch -media a4 yourimage.ps &
then 'gv' will re-draw its image each time the PS file changes, so you can tweak the third ($WID) and 4th ($VMOVE) arguments until you like the result. In fact, you can play with the script to your heart's content.
Good hunting, and best wishes, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 01-Jul-05 Time: 01:51:54 ------------------------------ XFMail ------------------------------
On Fri, Jul 01, 2005 at 01:52:02AM +0100, Ted Harding wrote:
On 30-Jun-05 Anthony Anson wrote:
The message 20050630201420.GA8048@areti.co.uk from Chris Green chris@areti.co.uk contains these words:
I have some GIF and JPG files (they're maps of wine producing areas in France) that I want to print. What's the easiest application to use to do this? All I want is for the image to be scaled to the best size to fit a sheet of A4 paper, no other manipulation is required.
When I just opened the file from the xfce file manager using the default application it opened with ImageMagick, it looked perfect on screen but when I selected print the printout was displaced so that only half of it was printed. The orientation was right, it was just shifted down. I couldn't find any way to set up the printout in ImageMagick. I'm not even sure what sort of ImageMagick is being invoked - almost as bad as Windows!
I'm going to chip in with an ancient but effective suggestion, in the old Unix tradition of getting Linux to work for you.
You have ImageMagick, Chris, so you have 'convert', so:
convert yourimage.gif yourimage.eps
Prepare a text file "myprint.tr" with contents
.LP .PSPIC yourimage.eps 6i
- Run
groff -Tps -ms myprint.tr > myprint.ps
You then have a PostScript file "myprint.ps" which you can view with
gv myprint.ps
and, if satisfied:
Print this by whatever means you use to print PS files.
The setup of "myprint.tr" will give you the image centred on the page, at the top of the printing area (with a 1-inch header margin) and 6 inches wide.
a) To change the width, alter the "6i" in the ".PSPIC" line.
b) To change the vertical placement:
-- To move it further down the page, change the text to
.LP .sp 2.5i .PSPIC yourimage.eps 6i
which will move it down 2.5 inches.
-- To move it further up, decrease the Header Margin, e.g.
.nr HM 0.6i .LP .PSPIC yourimage.eps 6i
which, instead of a default 1-inch header Marging will give you 0.6i (i.e. 0.4i furtherup the page).
Tune things as above until you are satisfied (testing with the 'gv' viewer).
You can generalise the above with a script, e.g. "printscript":
#! /bin/bash NAME=$1 TYPE=$2 WID=$3 VMOVE=$4 if ! [ -e $NAME.eps ] ; then convert $NAME.$TYPE $NAME.eps ; fi groff -Tps -ms - > $NAME.ps << EOT .nr HM 1i+$VMOVE .LP .PSPIC $NAME.eps $WID EOT
and run it as (e.g.)
printscript yourimage gif 5i -0.5i
which would generate the PostScript file "yourimage.ps" containing the graphic "yourimage.gif" centred, 5 inches wide, and moved up 0.5 inches relative to a Header Margin of 1 inch.
If you view the first run with
gv -watch -media a4 yourimage.ps &
then 'gv' will re-draw its image each time the PS file changes, so you can tweak the third ($WID) and 4th ($VMOVE) arguments until you like the result. In fact, you can play with the script to your heart's content.
Good hunting, and best wishes, Ted.
Er, um, that really does seem a bit OTT just to print soemthing!
Chris Green chris@areti.co.uk wrote:
[...] My printers seem to be set up right for everything else on my Linux box, why did the Gimp not get that right?
I think the Gimp does its own thing with printers, usually managing to give better printing of colour artwork than most of the usual drivers (although there is slow convergence of gimp-print, ghostscript and CUPS, I think). It does mean that you have to set the options at the top right of the print dialogue on the first time and then tell it to save the settings.
I'm having a bit of fun and games with printing images myself today. Without a working Gimp, I'd probably try some mogrify command for your task, or netpbm trickery.
Hope that helps,
On Thu, Jun 30, 2005 at 11:27:25PM +0100, MJ Ray wrote:
Chris Green chris@areti.co.uk wrote:
[...] My printers seem to be set up right for everything else on my Linux box, why did the Gimp not get that right?
I think the Gimp does its own thing with printers, usually managing to give better printing of colour artwork than most of the usual drivers (although there is slow convergence of gimp-print, ghostscript and CUPS, I think). It does mean that you have to set the options at the top right of the print dialogue on the first time and then tell it to save the settings.
But what should I set to what?
I have my printer drivers installed in CUPS and everything else uses those by selecting printer Oj for the Officejet and Lj for the Laserjet. Gimp seems to send postscript to the printer even though I selected one of my CUPS printers, that's a bit brain dead. The Gimp doesn't seem to have drivers for my (pretty standard) HP printers.
On Fri, Jul 01, 2005 at 01:21:16PM +0100, Chris Green wrote:
I have my printer drivers installed in CUPS and everything else uses those by selecting printer Oj for the Officejet and Lj for the Laserjet. Gimp seems to send postscript to the printer even though I selected one of my CUPS printers, that's a bit brain dead. The Gimp doesn't seem to have drivers for my (pretty standard) HP printers.
What printers? (model numbers please) and which distro? Printing can be "fun" sometimes so there is an element of stabbing in the dark with the info you gave us so far :)
Adam
On Fri, Jul 01, 2005 at 01:27:44PM +0100, Adam Bower wrote:
On Fri, Jul 01, 2005 at 01:21:16PM +0100, Chris Green wrote:
I have my printer drivers installed in CUPS and everything else uses those by selecting printer Oj for the Officejet and Lj for the Laserjet. Gimp seems to send postscript to the printer even though I selected one of my CUPS printers, that's a bit brain dead. The Gimp doesn't seem to have drivers for my (pretty standard) HP printers.
What printers? (model numbers please) and which distro? Printing can be "fun" sometimes so there is an element of stabbing in the dark with the info you gave us so far :)
Slackware 10.1 with CUPS.
Printers are an HP7310 and an HP1060 (I think). I have the HPLIP drivers installed for the printers and they work well in general. I can print with no problems from firefox for example, it's just that I'm having trouble getting these .GIF and .JPG files to print so they look sensible on an A4 sheet of paper.
On 01-Jul-05 Chris Green wrote:
On Fri, Jul 01, 2005 at 01:27:44PM +0100, Adam Bower wrote:
On Fri, Jul 01, 2005 at 01:21:16PM +0100, Chris Green wrote:
I have my printer drivers installed in CUPS and everything else uses those by selecting printer Oj for the Officejet and Lj for the Laserjet. Gimp seems to send postscript to the printer even though I selected one of my CUPS printers, that's a bit brain dead. The Gimp doesn't seem to have drivers for my (pretty standard) HP printers.
What printers? (model numbers please) and which distro? Printing can be "fun" sometimes so there is an element of stabbing in the dark with the info you gave us so far :)
Slackware 10.1 with CUPS.
Printers are an HP7310 and an HP1060 (I think). I have the HPLIP drivers installed for the printers and they work well in general. I can print with no problems from firefox for example, it's just that I'm having trouble getting these .GIF and .JPG files to print so they look sensible on an A4 sheet of paper.
That was the whole point of my suggestion of using 'groff'. Chris said "that really does seem a bit OTT just to print soemthing!", but the point is that he wants it to "look sensible", and when you do it the 'groff' way you have total control over size, position, etc., once you have the graphic as an EPS (".eps") file, since enxapsulated within this is the "%%BoundingBox" line which defines the extent of the graphic in PS coordinates.
All you need is that your system somehow correctly prints PostScript files (I ensure this myself by having only PS-capable printers; otherwise you have to set up filters or "drivers" for whatever printer you have).
The discussion points by Chris and others indicate clearly just how elusive and problematic it can be to "tune" the printed output using the controls available in programs such as ImageMagick, Gimp, etc. -- or, indeed, get it to work at all!
Indeed, ImageMagick's 'display' program seems to offer you no options at all to control how the image you are displaying gets printed -- it simply "prints to a PostScript printer".
The Gimp's print-dialogue however does offer a good range of tuneable options, including choice of printer if yours in on the list (so I would choose "PostScript Level 2"). If the worst comes to the worst, you can also choose to print to file and then cope with sending this file to the printer by some other mechanism, if doing it directly from the Gimp does not work.
The Gimp's "Preview" does show how the graphic will appear on the A4 sheet, provided "A4" has been selected as "Media Size", so you should be able to choose the other parameters according to taste. All in all, the Gimp probably offers the most flexible "point & click" approach, provided you can overcome any problems of talking to the printer!
Best wishes, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 01-Jul-05 Time: 14:28:25 ------------------------------ XFMail ------------------------------
On Thu, Jun 30, 2005 at 09:14:20PM +0100, Chris Green wrote:
Then I tried opening the file with the Gimp and printing it, even more disastrous, the Gimp did its own thing and simply sent Postscript to the printer and thus produced nothing useful at all except lots of wasted paper. My printers seem to be set up right for everything else on my Linux box, why did the Gimp not get that right?
You don't say which version of gimp you are using, but for gimp 2.X you possibly want to go to the print dialogue and click the "setup printer" button. In the bit where it says "command" you probably want to put -oraw as an option to the existing command.
For example mine says :-
lp -s -dQueue -oraw
(-s supresses messages about job id, -dQueue means print to the printer called Queue)
Adam
On Fri, 1 Jul 2005, Adam Bower wrote:
On Thu, Jun 30, 2005 at 09:14:20PM +0100, Chris Green wrote:
Then I tried opening the file with the Gimp and printing it, even more disastrous, the Gimp did its own thing and simply sent Postscript to the printer and thus produced nothing useful at all except lots of wasted paper. My printers seem to be set up right for everything else on my Linux box, why did the Gimp not get that right?
You don't say which version of gimp you are using, but for gimp 2.X you possibly want to go to the print dialogue and click the "setup printer" button. In the bit where it says "command" you probably want to put -oraw as an option to the existing command.
On the other hand: as I understand it, the problem Chris has is that his printer is producing the postscript code as text, rather than the picture it represents. I had the same problem, and solved it by _removing_ the "-o raw" that Gimp had put there by default.
On Fri, Jul 01, 2005 at 10:28:14AM +0100, Dan Hatton wrote:
On the other hand: as I understand it, the problem Chris has is that his printer is producing the postscript code as text, rather than the picture it represents. I had the same problem, and solved it by _removing_ the "-o raw" that Gimp had put there by default.
Aah, right. Well I also had the same problem and I definitely had to add a -oraw to the options.... but I am printing to a networked cups printer using gimp-print modules in cups (i think, not checked for a while now).
I think that the solution(s) Chris should try would be removing the -o raw if it is there, and if it isn't there then he should try adding it. Quite why this is I do not know :) if I get some spare time later I will investigate and report back to the list.
Thanks Adam
On Fri, Jul 01, 2005 at 12:54:19AM +0100, Adam Bower wrote:
On Thu, Jun 30, 2005 at 09:14:20PM +0100, Chris Green wrote:
Then I tried opening the file with the Gimp and printing it, even more disastrous, the Gimp did its own thing and simply sent Postscript to the printer and thus produced nothing useful at all except lots of wasted paper. My printers seem to be set up right for everything else on my Linux box, why did the Gimp not get that right?
You don't say which version of gimp you are using, but for gimp 2.X you possibly want to go to the print dialogue and click the "setup printer" button. In the bit where it says "command" you probably want to put -oraw as an option to the existing command.
For example mine says :-
lp -s -dQueue -oraw
(-s supresses messages about job id, -dQueue means print to the printer called Queue)
Ah, now this sounds like more like it. I am running Gimp 2.x.
I'll do some experimenting, thanks.