Sample Header Ad - 728x90

Is it possible to print multiple copies to PDF using CUPS/lpr

2 votes
1 answer
717 views
I'm testing an application that sends PDFs to a printer, and it may request that multiple copies are printed, sending a command like /usr/bin/lpr -T Document Title -# 10 I don't have access to a physical printer, so I'm using the CUPS generic virtual printer to "print" PDFs to disk. This works, however regardless of the number of copies requested, it only prints a single file.
$ echo hello > hello.txt
$ lpr -P PDF -T test -# 2  hello.txt 
$ ls PDF/
test.pdf
Is there a configuration that will respect the copies argument, for example creating hello-1.pdf and hello-2.pdf? - Distribution is Debian 9. - cups: 2.2.1-8+deb9u6 - cups-bsd: 2.2.1-8+deb9u6 - cups-pdf: 2.6.1-22 - grep MaxCopies /etc/cups/cupsd.conf -> MaxCopies 100
Asked by snakecharmerb (127 rep)
Apr 30, 2021, 01:55 PM
Last activity: Apr 30, 2021, 02:56 PM