CUPS command line Duplex Multiple Documents
Is there a command line option in CUPS to print two documents on opposite sides of same page. I have 2 single-page documents that I would like to print to opposite sides of the same page. I want to be able to do this from the command line, so that I can add it as a CRON job. If there is not an 'lpr' command option, anyone have a script that might work?
|
|
I have already read the CUPS docs, thank you. I can see how to print multiple documents, and how to duplex, but nothing I have found will do what I am attempting. Could you show an example of how I might accomplish my goal?
|
Sorry, I did not read the question correctly...
What type of documents i.e text, otf PDF etc. Is your printer duplex capable? |
Quote:
They are both pdf files and are both located in the same folder. My printer is duplex capable. I have tried setting the the default option of duplex (in the CUPS options web interface), and using the following command to print: Code:
lpr -P HP8500 /path/to/first/file /path/to/second/file |
A simple script using pdftk to join the documents together like the example below.
pdftk /path/to/file1.pdf /path/to/file2.pdf cat output /path/to/combined.pdf lpr -o sides=two-sided-long-edge -P HP8500 /path/to/combined.pdf https://www.pdflabs.com/docs/pdftk-man-page/ |
Quote:
|
For text files you can use enscript.
For word processor type files (doc,otf) I believe you can use Libreoffice writer command line to convert them to PDF and then use pdftk as above. |
All times are GMT -5. The time now is 02:05 AM. |