LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-11-2006, 10:18 AM   #1
noeffred
Member
 
Registered: Mar 2004
Location: Austria
Distribution: Ubuntu 6.0.6, CentOS, Fedora, Debian
Posts: 47

Rep: Reputation: 15
Printing from command line


Hi there

I'm having some problems printing a PDF file to a Zebra label printer.

I print from the command line with the following command

Code:
$ lp -o fitplot -o landscape FILE.PDF
Neither the fitplot (which should scale down the input), nor the landscape option have any effect. I suspect the page the printer interprets is an A4 sized page, since it spits out 2 labels which would be the equivalent of the short side of an A4.

If I do this
Code:
$ pdf2ps FILE.PDF - | lp -o fitplot -o landscape
The scaling seems to kick in, since the printer spits out only one label, but unfortunately it's not rotated properly.

And properly rotating a PS file appears to be quite a bitch.


I used to have this problem with my Laserjet printer some years ago, but by now the Laserjet works perfectly.

what options do I have? I would very much like to have it print from the shell since I'm planning on using this in a shell script.

I can print in landscape mode using Adobes Acrobat Reader, but not using xpdf (which I would prefer) or other PDF viewers.

Any ideas?
 
Old 08-11-2006, 10:25 PM   #2
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
Paper size is a parameter but I haven't even selected with the command line. The default paper size is A4 if you don't change it. Have you tried adding the printer with the GUI? Setting paper size is a parameter there.
 
Old 08-12-2006, 06:08 AM   #3
noeffred
Member
 
Registered: Mar 2004
Location: Austria
Distribution: Ubuntu 6.0.6, CentOS, Fedora, Debian
Posts: 47

Original Poster
Rep: Reputation: 15
The papersize is set in the printer options (I've added the printer via the cups web interface)

The label is the "w162h288/Label".

Code:
pdf2ps FILE.PDF - | lp -o media=w162h288/Label -o landscape -o fitplot
I've tried several combinations of the media option when printing, using only "w162h288" or only "Label" as papersize, yet there is no change whatsoever. Printing the PDF directly yields an A4 page, printing the Postscript file always yields the label printed without the proper rotation, no matter the options.
 
Old 08-12-2006, 01:26 PM   #4
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
I don't use command line to print but I believe there is more than one place to set paper size and both must be set.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
samba printing command line tomolesonjr Linux - Networking 8 04-07-2006 06:14 AM
Command Line Printing lasalsademuerte Linux - General 1 02-18-2006 03:38 PM
command line printing rb3ng Linux - Newbie 3 04-22-2004 12:35 PM
Command line printing? HappyDude Linux - Software 2 10-25-2003 01:00 PM
Printing error from command line nutshell Linux - General 0 03-02-2002 04:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration