我有一个包含 PDF 文件列表的 bash 脚本。打印机输出是通过注释/取消注释文件要求来定制的(参见下面的示例脚本)。我希望对此进行补充,以便我可以选择使用 pdftk(或纸质打印机)将所有选定的文件打印到单个 pdf 中。我熟悉 pdftk 虽然不熟悉 bash。
任何人都可以将 bash 代码指定为一个 PDF 输出吗?
谢谢
!/bin/bash
# Print document pack
# Instructions
# ls > print.txt Generate the file list into a file
# -o sides=two-sided-long-edge -#1 Prints two sided long edge, one copy
# -o sides=two-sided-long-edge -#2 Prints two sided long edge, two copies
# -o page-ranges=1 -#1 Print first page only, one copy
# -o page-ranges=1-2,5-7 -#1 Print pages 1-2 & 5-7 only, one copy
# -lt x sets number of packs to be printed
# while [ $COUNTER -lt ***** 1 ****** ]; do NUMBER INSIDE STARS INDICATES NUMBER PACKS TO PRINT
COUNTER=0
while [ $COUNTER -lt 1 ]; do
lpr "doc01.pdf"
lpr "doc02.pdf"
lpr -o sides=two-sided-long-edge -#1 "doc03.pdf"
# lpr "doc04.pdf"
# lpr "doc05.pdf"
lpr -o sides=one-sided-long-edge -o page-ranges=1 -#1 "doc06.pdf"
# lpr "doc07.pdf"
lpr -o sides=two-sided-long-edge -#2 "doc08.pdf"
lpr "doc09.pdf"
lpr "doc10.pdf"
let COUNTER=COUNTER+1
done