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?

Willem Van Onsem
  • 618
  • 1
  • 8
  • 18

1 Answers1

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.

Sahil Arora
  • 111
  • 3