phunni Posted September 15, 2003 Report Share Posted September 15, 2003 If I try to print from an application that just uses lpr <filename> - i.e. nedit, sylpheed etc... then the printed text page doesn't fit the paper - it starts too high and too far to the left. Does anyone know how I can fix this? I've tried doing an lpr <filename> direct from the command line with the same results... Quote Link to comment Share on other sites More sharing options...
phunni Posted September 17, 2003 Author Report Share Posted September 17, 2003 anyone have any ideas? at all? BTW my setup is that I'm printing to a computer acting as a server which runs MDK 9.1 All commands have been issued from my desktop computer. Edit: I have just run the same command (lpr <filename>) from the server and it works perfectly. This is a problem happening over the network somewhere... Quote Link to comment Share on other sites More sharing options...
schussat Posted September 17, 2003 Report Share Posted September 17, 2003 anyone have any ideas? at all? Nothing too particular, just in terms of troubleshooting. Is the "client" PC also running mdk9.1? Same configuration generally? If you print a postscript or pdf file using lpr, do you get the same off-kilter result? Is it possible that lpr is using the wrong paper settings? (ie, you're printing on A4 paper with the letter setting) That's all I've got off the top of my head. Quote Link to comment Share on other sites More sharing options...
phunni Posted September 17, 2003 Author Report Share Posted September 17, 2003 running gentoo... It only seems to happen for normal text files. Although the other programs have settings dialogs... How would I find out if I'm printing to letter or whatever? The paper is actually A4 Quote Link to comment Share on other sites More sharing options...
schussat Posted September 17, 2003 Report Share Posted September 17, 2003 How would I find out if I'm printing to letter or whatever? The paper is actually A4 I'm not sure what lpr's default is -- it likely depends on the printer and driver -- but to specify A4 size, try this: lpr -o media=A4 filename If you're using CUPS, you can also set the paper size in the printer setup. Because Quote Link to comment Share on other sites More sharing options...
phunni Posted September 17, 2003 Author Report Share Posted September 17, 2003 How would I find out if I'm printing to letter or whatever? The paper is actually A4 I'm not sure what lpr's default is -- it likely depends on the printer and driver -- but to specify A4 size, try this: lpr -o media=A4 filename If you're using CUPS, you can also set the paper size in the printer setup. Because Because what? I tried setting the paper size manually as you suggested - but this made no difference... Quote Link to comment Share on other sites More sharing options...
schussat Posted September 17, 2003 Report Share Posted September 17, 2003 Because what? Sorry, that was an aborted sentence. I think I was about to suggest something related to the print dialogs of other applications, like Acrobat Reader. Chances are those send all the proper options to the printer, which is why a PDF, for instance, seems to print normally. But what happens if you print a PDF from the command line, using lpr? If you get the same funny offset, it's almost certainly a problem with the paper size setting. I tried setting the paper size manually as you suggested - but this made no difference... Hrrrm. I don't know that much about the ins and outs of lpr; that suggestion was just the result of some googling. It's possible that the printer driver is incorrectly set, disallowing the modification of the paper size. Can you try a generic driver? Maybe install and give CUPS a try? Quote Link to comment Share on other sites More sharing options...
phunni Posted September 18, 2003 Author Report Share Posted September 18, 2003 OK - here's a more detailed run dow nof the system. I have a server running MdK 9.1 with a CUPS server and a printer connected to it. This machine is viible on the LAN to three others - 2 windows laptops and my main desktop running gentoo. The laptops print to the server via a simple setup of networking printing on windows. The Linux desktop prints to the server my simply pointing to it as the printing server in cupsclient.conf (or whatever that file is called) I'll try and print a PDF from the command lina and post my results Quote Link to comment Share on other sites More sharing options...
phunni Posted September 18, 2003 Author Report Share Posted September 18, 2003 A PDF prints perfectly from the command line using lpr filename Quote Link to comment Share on other sites More sharing options...
schussat Posted September 18, 2003 Report Share Posted September 18, 2003 A PDF prints perfectly from the command line using lpr filename Well, in that case, I'm stumped. We have officially exhausted my knowledge of printing. Maybe monkeying with the driver or trying CUPS? Quote Link to comment Share on other sites More sharing options...
phunni Posted September 18, 2003 Author Report Share Posted September 18, 2003 CUPS is what I'm using... Quote Link to comment Share on other sites More sharing options...
spinynorman Posted September 20, 2003 Report Share Posted September 20, 2003 I haven't used this myself , but according to the CUPS users manual http://localhost:631/sum.html, the following can be used to change your margins - lpr -o page-top=value filename ENTER lpr -o page-left=value filename ENTER I suppose the above could mess up your settings in applications, so perhaps you could set up a specific printer instance - lpoptions -p laserjet/lprtext -o page-top=value ENTER lpoptions -p laserjet/lprtext -o page-left=value ENTER lpr -P laserjet/lprtext filename ENTER Hope this helps. :) Quote Link to comment Share on other sites More sharing options...
phunni Posted October 21, 2003 Author Report Share Posted October 21, 2003 ok - I've set some default options including media and the page margins This has fixed the above problem, but I am presented with a new one. The text is not wrapped. If any lines are longer than will fit on the page - only the first section of the line is printed :( In the CUPS docs I can't find any option to wrap the printed text. If I can fix this then (finally) printing will (I think!) behave as I want it to! Quote Link to comment Share on other sites More sharing options...
spinynorman Posted October 21, 2003 Report Share Posted October 21, 2003 I've found this command called 'enscript', which you can use at the command line - or do you want to print from within your applications? Anyway, the link describes how it converts plain text to PostScript, and further on, in Outputting Text as a Poster or Sign, it uses word-wrap. www.tldp.org/LDP/linuxcookbook/html/cookbook_19.html#SEC288 Use 'man enscript' for all the options... :) Quote Link to comment Share on other sites More sharing options...
phunni Posted October 21, 2003 Author Report Share Posted October 21, 2003 I've found this command called 'enscript', which you can use at the command line - or do you want to print from within your applications? Anyway, the link describes how it converts plain text to PostScript, and further on, in Outputting Text as a Poster or Sign, it uses word-wrap. www.tldp.org/LDP/linuxcookbook/html/cookbook_19.html#SEC288 Use 'man enscript' for all the options... :) Thanks - I'll give it a go. I do want to print from apps - but the problematic apps all let me specify a command to use so this is probably still a good solution... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.