3

I'm getting a strange behavior with the lp command on Mac OS Catalina. I have a 12-page PDF file and want to print all pages in the PDF. I'm hoping to print hundreds of PDFs using lp or lpr with a variable number of pages.

The following only prints the first page:

lp  -d MY_PRINTER -o fit-to-page -o media=A4 myfile.PDF

These commands also only print the first page:

lp  -d MY_PRINTER -o fit-to-page -o media=A4 myfile.PDF -o page-ranges=1-999999
lp  -d MY_PRINTER -o fit-to-page -o media=A4 myfile.PDF -o page-ranges=1-12

But strangely, this command prints pages 3-12:

lp  -d MY_PRINTER -o fit-to-page -o media=A4 myfile.PDF -o page-ranges=3-999999

Does anyone know how to force lp (or lpr) to print all N pages of a PDF?

Alex Cook
  • 131
  • 2

0 Answers0