4

One can call lpr to use cups-pdf printer to print a file to pdf, for instance foo.txt

lpr -P PDF foo.txt

When calling, the printer creates a directory called PDF in the $HOME directory and creates a file named foo.pdf.

This manual shows how to change the printers default directory. I'm wondering whether it is possible however to pass an option to the pdf printer that sets the output path specifically. Something like:

lpr -P PDF foo.txt -o bar.pdf

Such that only for this one call, the output path is bar.pdf.

Is this possible?

0

cups-pdf is not an extension to cups. All it does is provide a virtual printer which prints PDF files instead of physical sheets of paper. Since every printer has a single output tray where you collect your printed sheets, cups-pdf has the default output directory, hence there is no way to mention command line options to lpr to print to a different location.

For all the configurations in cups-pdf, refer official documentation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.