我有后记 PS 图像并编写了一个宏来转换为 PDF,然后裁剪到它们的边界框大小。该代码工作正常,但我想有一种更直接的方法可以做到这一点。任何帮助,不胜感激。谢谢。
##!/bin/sh
echo 'Convert all PS to PDF in current directory and then crop according to the DAVE
sizes (5x4in) 1.75,3.5in offset: in standard PS Letter size'
pwd
for f in *.ps
do
ps2pdf -dEPSCrop "$f"
done
for g in *.pdf
do
pdfcrop --margins "10 10 10 10" "$g"
rm "$g"
done