linux reverse page order+duplex is not working


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users linux reverse page order+duplex is not working
# 1  
Old 06-02-2008
linux reverse page order+duplex is not working

hi all,

i have a postscript file with duplex print commands. When i print it with
lpr command it prints in duplex.

lpr -pprintername filename.ps

but when i try to print the pages in reverse order with -outputorder=reverse
it is not printing in reverse order (but pages are prited in duplex since PS file has duplex commands)

lpr -pprintername -o outputorder=reverse filename.ps

again i tried to print a postscript file without duplex commands and with outputorder=reverse option. Now pages are printed in reverse order.

So the problem is whenever the PS file has duplex commands outputorder=reverse option doesnt work for me.

Kindly suggest me a solution .....


Thanks and Regards,
uttam hoode
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Issues with sorting in reverse order

I have a unix script that outputs a summary file to the mac desktop. The file is called summary.txt I am trying to configure such so that the summary.txt file lists the content contained within such in reverse sort order. I have used sort -r but it does not seem to work. I would be... (8 Replies)
Discussion started by: Braveheart
8 Replies

2. Shell Programming and Scripting

Delete records in reverse order

Hi all, i have dynamic file 'xyz.txt', records always look likes below format ... 0000021 RET 31-MAR-1984 FAP 0000021 DTA 14-JAN-2003 CNV 0000021 DTA 25-MAR-2012 DTA 0000021 DTA 26-MAR-2012 DTA ################################################# 0000021 DTA ... (4 Replies)
Discussion started by: krupasindhu18
4 Replies

3. Web Development

CGI not working with httpd server on busybox 1.15.0 on ltib Linux 2.6.34 (404 page not found)

I have some industrial ARM linux board with 2.6.34 Linux on it with Busybox v1.15.0. The https.conf is located in /etc/ and contains: H:/root/web In the www directory I also have 'cgi-bin' folder with chmod 777 and in that folder a file called 'testcgi'. Now I start the server with... (1 Reply)
Discussion started by: Roboserg
1 Replies

4. Shell Programming and Scripting

print in reverse order

Hi, I want to print the item in reverse order such that the output would look like 00 50 50 23 40 22 02 96 Below is the input: 00 05 05 32 04 22 20 69 Video tutorial on how to use code tags in The UNIX and Linux Forums. (5 Replies)
Discussion started by: reignangel2003
5 Replies

5. UNIX for Dummies Questions & Answers

printing fields in reverse order

command/script(apart from awk) to print the fields in reverse order that is last field has to come first and so on and first field has to go last Input store-id date sale ............. ............. ... (3 Replies)
Discussion started by: tsurendra
3 Replies

6. Shell Programming and Scripting

How to get fields in reverse order?

i am having lines like below seperated by "|" (pipe) abc|xyz 123|567 i have to get the above in reverse order xyz|abc 567|123 Pls help (5 Replies)
Discussion started by: suryanarayana
5 Replies

7. Shell Programming and Scripting

cut a field, but with reverse order

Hi Everyone, I have one a.txt: a b 001 c b b 002 c c c, not 002 c The output should be 001 002 002 If i use cut -f 3 -d' ', this does not work on the 3rd line, so i thought is any way to cut the field counting from the end? or any perl thing can do this?:confused: ... (3 Replies)
Discussion started by: jimmy_y
3 Replies

8. UNIX for Dummies Questions & Answers

sort -reverse order

I need to sort the particular column only in reverse order how i can give it.. if i give the -r option the whole file is getting sorted in reverse order. 1st 2nd col 3rd C col 4th col 5th col ------------------------------------------- C... (7 Replies)
Discussion started by: sivakumar.rj
7 Replies

9. UNIX for Dummies Questions & Answers

using sed and regex to reverse order???

so i have been trying to learn how to manipulate text on my own and have gotten stumped... let's say i have a text file that says (highly simplified): people ordinary How would swap the order of the words.. I know i need to use sed and some kind of back reference but cannot make it... (2 Replies)
Discussion started by: urtherhoda
2 Replies
Login or Register to Ask a Question
MPAGE(1)						      General Commands Manual							  MPAGE(1)

NAME
mpage - print multiple pages per sheet on PostScript printer SYNOPSIS
mpage [-1248aAceEfHloOrRStTuUvVxX] [-b papersize] [-B[num[lrtb]]...] [-C [encoding]] [-da|p] [-D dateformat] [-F fontname] [-h header] [-j first[-last][%interval]] [-J startpageno] [-L lines] [-m[num[lrtb]]...] [-M[num[lrtb]]...] [-p[prprog]] [-P[printer]] [-s tabstop] [-W width] [-z printcmd] [-Z printcmd_args] [file ...] DESCRIPTION
mpage reads plain text files or PostScript documents and prints them on a PostScript printer with the text reduced in size so that several pages appear on one sheet of paper. This is useful for viewing large printouts on a small amount of paper. It uses ISO 8859.1 to print 8-bit characters. The following options are recognized (note that arguments to options may be separated from the option by spaces, except for -B, -m, -M, -p and -P): Also when mpage encounters -- as option it will stop parsing arguments and the remaining arguments are interpreted as filenames. -1 Print 1 normal page per sheet (included for symmetry). -2 Print 2 normal pages per sheet. -4 Print 4 normal pages per sheet (default). -8 Print 8 normal pages per sheet. -a Toggle layout of the pages on the sheet so that successively numbered pages run down the sheet, as opposed to left to right. (default updown). -A This option is deprecated, use -bA4 instead. -bpapersize Prepare output for the selected paper type. Papersize can be A3 for European A3, A4 for European A4, Letter for US Letter, or Legal for Legal sized paper. For available types, see option -bl. For the default, see 'mpage -x'. This default is taken from the sys- tem; see papersize(5). If it isn't found, mpage exits with an error. -bl, -b? List the currently available paper types, then exit. -B[<num>[lrtb]*] Setup a box around a particular part of your page. Specify text box margins and line thickness. The default is 0 columns (lines) for both left and right (top and bottom) margins and 0 line thickness. Specifying -B solely toggles printing of the box. l, r, t or b set the left, right, top or bottom margin respectively to <num> columns (lines). Not specifying any of the sides, will set the line thickness when <num> is given. For example -B1 sets the line thickness to 1. Sides with negative margins will not print. -c Toggle concatenation of pages from different files on single sheets (default off). -C[encodingfile] Specify the character encoding file. The file should be in the mpage library directory (/usr/lib/mpage). Mpage has an internal default encoding based on Latin-1 or IBM codepage 850. Depending on compile time option this encoding definition is on or not. Not specifying an encodingfile will toggle the usage of the internal encoding. -da|p Force input to be taken as ascii (a) or postscript (p) text. This way you can print your postscript code as text, or print post- script code that mpage does not recognise. When using -dp, make sure that the the postscript code contains %Page page separators or else things will probably look odd. -Ddateformat Set the date format as in strftime(3) to be used in date/time representations (e.g. in headers). (Note: to make this useful you probably need the -H option.) -e Print 2 normal pages per sheet in duplex mode: every first and fourth page on one side and every second and third on the other side. This is more or less a combination of the -O and -E options but in one pass. -E Print 2 normal pages per sheet, namely: print only the second and third page of every set of four pages. See also -O. These options override -a and -l. Using these options double sided prints can be created without a duplex printer. -f Toggles folding lines longer than page width (default off). -Ffontname Specify font. (default Courier). Check your printer for supported fonts. Note: this has almost nothing to do with the fonts used for your X-windows/KDE/Gnome environment. -hheader This is used only when the -p or -H switch is used and is passed as the "-h header" option to pr(1) or as the header for -H. -H Create header line for each logical page separated from page text by a horizontal line. Unless -h is given, the header consists of last file modification time, filename and page number, all in bold and slightly larger font. This option only applies to non-post- script files. -Iindent Indent text by indent characters. -jfirst[-last][%interval] Print just the selected sheets, specified by a number, starting at 1. Here last defaults to the end of data, interval to 1. Sev- eral -j options can be given (up to MAXJARGS, default 100) to create a complex selection of pages. Thus -j1-10 selects the first 10 sheets, while -j 1%2 prints just the odd-numbered sheets and -j 2%2 prints just the even ones. You can do double-sided printing, in two passes, as follows. If you use 3-hole punched paper, put it in the printer such that the holes will appear at the top of the page -- on the right as you pull out the printer tray, in our Laser writer II NTX. Print the odd-numbered sheets with mpage ... -j 1%2 ... Note the number of pages it reports. (Only half this many will really be printed). When printing finishes, if mpage reported an odd number of pages, remove the last one from the stack, since there will be no even-numbered sheet to match it. Then arrange the stack of paper for printing on the other side. (If it's punched, the holes will now be on the left.) On our II NTX, the paper comes out blank-side up; replace it in the tray still blank-side up but rotated 180 degrees. For other printers, you figure it out. Now print the even-numbered sheets in reverse order with mpage ... -r -j 2%2 ... hoping no one else reaches the printer before you do. -Jstartpageno Set the start value of the sheet page count to startpageno instead of 1. -k When mpage finds a %%Trailer or %%PSTrailer in the postscript input file it normally assumes this is the end of the postscript file and stops reading the input file. But when the PS file includes EPS files, %%Trailers might be anywhere. Using this option ignores the %%Trailer and %%PSTrailer lines. -l Toggle printing landscape or portrait mode (default portrait). Landscape pages are 55 lines long by 132 characters wide by default. Portrait pages are 66 lines long by 80 characters wide by default. -Llines Adjust the page reduction parameters so that lines lines will fit in the space of one page. This overrides the default values nor- mally supplied. (See -l.) If used in conjunction with -p then this value is passed to the pr(1) as well. As a side effect this changes the font size as well (as will the -W option.) So while there is an option to change font family, there is no explicit option to change font size! -m[<num>[lrtb]*] Specify sheet margin. The default margin is 20 points. Only specifying -m sets left margin to 40 points. l, r, t or b set left, right, top or bottom margin respectively to <num> points. Not specifying any of the sides will set all sides when <num> is given. <num> defaults to 40 points. For example -m10 sets all margins to 10 points. -ml50tb sets left margin to default 40 and top and bottom margins to 50 points. -m50l25bt30r sets bottom and top margin to 25, left margin to 50 and right margin to 30 points. Mar- gins can have negative numbers. -M[<num>[lrtb]*] Specify logical page margins. For syntax, see -m option. Defaults are 4 for -M solely, and 8 for <num>. Margins can be negative. This way large white borders in your (postscript) documents can be reduced. -o Toggle printing of outlines around each reduced page (default on). -O Print 2 normal pages per sheet, namely: print only the first and fourth page of every set of four pages. See also -E. These options override -a and -l. Using these options double sided prints can be created without a duplex printer. -p[prprog] Pipe input through prprog command (including specified options) before printing (assumes the input is a text file). When no command is specified, it defaults to pr(1). -P[printer] Specify the printer to which the PostScript output is sent (e.g. lpr -Pprinter). Using -P with no printer specified sends the Post- Script to the default printer queue (e.g. lpr). Using -P- returns output to stdout, useful in combination with the MPAGE environment variable. Without -P output is sent to standard output. -r Reverse printing. The last sheet is printed first. The way of arranging reduced pages on the sheets doesn't change. -R Switch to left to right mode, starting first page on left bottom corner. This might be useful for landscape postscript files. (Note: using -l after -R undoes -R, and switches to normal landscape mode.) -stabstop Set tabstop width (default 8 characters). Should be >= 2. -S Accept non-square page reduction. By default, pages are shrunk equally in X and Y, even if this wastes some space on the sheet. With -S, reduced pages are larger but slightly distorted. (Only used when printing postscript files.) -t Toggle printing on both sides of the paper. This option has 3 states: nop, yes, no, which mean: NOP: don't do anything in PostScript, use the printer default; YES: force printer to do duplex; NO: force printer not to do it. If there is no -t, then the duplex is NOP. If you put some -t on the command line, the state toggles as "yes,no,yes,no...". So, if your printer is set to print, by default, in duplex mode, you will use "-t -t" on the command line to force it to print in non- duplex mode. Use this option only if your printer is capable of printing in duplex mode. (default NOP). -T Toggle tumble of every second pages. This option has 3 states: nop, yes, no (with behaviour similar to -t). So, if your printer is set to print, by default, in duplex mode, with tumble on, you will use "-T -T" on command line to print in nontumble mode. Use this option only if your printer is capable of printing in duplex mode. With this version of mpage, you may use this option even if you do not use -t. (default NOP). -u Toggle checking for UTF-8 input (not relevant for postscript input). -U This option is deprecated, use -bLetter instead. -v Toggle printing a count of the number of sheets produced for printing (default off). -V Print version information and exit. -Wwidth Adjust the page reduction parameters so that a line width characters long will fit in the space of one page. This overrides the default values normally supplied. (See -l.) If used in conjunction with -p then this value is passed to the pr(1) program as well. See also the -L option on font sizes. -x Print usage information (including current defaults), then exit. -X[header] Print header on the left and the page number on the right of each physical page (sheet). If no header is given, the default is the current filename (note influence of -c), the filename of the first file on the page is used. -zprintcommand Specify command to use to send output to. Default is lpr(1) for BSD style spooler, lp(1) for SYSV style spooler. You can specify command line options, but note -Z. For example -zlp for system V Unix. -Zprintprog_queuename_arg Specify what option to use for the "-z printcommand" to specify a printqueue. For example -zlp -Z-d for system V Unix. Default is -P for BSD style spooler, -d for SYSV style spooler. ENVIRONMENT
mpage examines the PRINTER (or LPDEST for SYSV style spooler) environment variable to override its default printer. The MPAGE_LIB environment variable can be used to control where the character encoding files (-C) can be found. mpage also examines the MPAGE environment variable for default option settings. Any option or combination of options can be specified in the MPAGE environment variable. For example, if MPAGE is set to the string: -2oPqms -L60 it would (in the absence of other command line arguments) print 2 pages per sheet, 60 lines per page, with outlines, on the printer named qms (overriding the PRINTER/LPDEST environment variable, if it exists). In the environment variable, white space is used as an option delimiter, and no quoting is recognized. Any command line options will override both the PRINTER and MPAGE environment variables. FILES
/tmp/mpageXXXXXX /usr/lib/mpage BUGS
Suffers under the burden of far too many switches. (But you wanted the choices!) NULL characters in a postscript input file will cause mpage to crash! Many others, we're sure. Mpage is year 2000 compliant, as long as the underlying operating system is!!! VERSION
Version 2.5.6, Released January 2008. Location: http://www.mesa.nl/pub/mpage ftp://ftp.mesa.nl/pub/mpage AUTHORS
Marcel Mol <marcel@mesa.nl> (current maintainer). Mark P. Hahn (Original author) 2008/01/14 MPAGE(1)