Hi,
Maybe someone can direct me to the answer. Using the command 'lpr' to print a 4 page file; what option or cmd do I use to just print the first 2 pages?
I can use the GUI dialog box,it gives me the option to select the range of pages,but how do I do that in the terminal?
Thank you.........
how do I select pages using lpr
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
how do I select pages using lpr
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: how do I select pages using lpr
I'm not sure that lpr has a command switch to do that. If the file is text, you might be better off making a copy of the first two pages and saving them in a separate file. Something like
cat old_file.txt | head -n 50 > new_file.txt
Should grab the first 50 lines and dump them in a new file, which you could then print.
cat old_file.txt | head -n 50 > new_file.txt
Should grab the first 50 lines and dump them in a new file, which you could then print.
Re: how do I select pages using lpr
Welcome to Linux Mint!
Suppose you wanted to print pages 5 and 6 out of 8 page total of my_letter, you would specify options with -o
other options can equally be set
Cheers,
pompom
Suppose you wanted to print pages 5 and 6 out of 8 page total of my_letter, you would specify options with -o
Code: Select all
lpr -P myprinter -o page-ranges=5-6 my_letter
lpr -P myprinter -o page-ranges=1,5-6 my_letter (including title page)
Code: Select all
lpr -P myprinter -o page-set=odd my_letter (just odd number pages)
lpr -P myprinter -o page-set=even my_letter (even number pages only)
pompom
Re: how do I select pages using lpr
pompom,
thank you for that info. works fine. most of the time man -pages are ambiguous. thanks..............
thank you for that info. works fine. most of the time man -pages are ambiguous. thanks..............