Ok, so I can print a PDF doing:
pdf2ps file.pdf - | lp -s
But now I want to use convert to merge several PDF files, I can do this with:
convert file1.pdf file2.pdf merged.pdf
which merges file1.pdf and file2.pdf into merged.pdf, target can be replaced with ‘-‘.
Question
How could I pipe convert into pdf2ps and then into lp though?
convert file1.pdf file2.pdf - | pdf2ps - - | lp -sshould do the job.
You send the output of the convert command to psf2ps, which in turn feeds its output to lp.