我有一个 Ghostscript 以 50 页为间隔拆分 PDF 书籍。问题是 GS 正在消除注释的透明度(我认为这在技术术语中称为 alpha 通道:http ://www.peteryu.ca/tutorials/publishing/pdf_manipulation_tips )。看一本书的以下段落。在拆分之前,亮点是完全可读的。
现在,它被拉黑了。
因此,我正在寻找一种方法来使用其他工具(如 PDFtk)或任何其他不会使我的注释变平的工具进行拆分。
最终,我想在 Mac 中使用 Hazel 在文件文件夹上运行脚本。
如果有帮助,这里是 Ghostscript:(我认为 $1 是 Hazel 导入文件的方式)。
echo "Page count: "
ournum=`gs -q -dNODISPLAY -c "("$1") (r) file runpdfbegin pdfpagecount = quit" 2>/dev/null`
declare -i counter;
declare -i counterplus;
counter=1;
while [ $counter -le $ournum ] ; do
echo $counter
newname=`echo $1 | sed -e s/\.pdf//g`
reallynewname=$newname-$counter.pdf
counterplus=$counter+50;
yes | gs -dBATCH -sOutputFile=$reallynewname -dFirstPage=$counter - dLastPage=$counterplus -sDEVICE=pdfwrite "$1" >& /dev/null
counter=$counterplus
done;
你们能帮我解决这个问题吗?
谢谢