Premise to execute in the parent directory where there is a directory for each psd file (original data) and pdf file (after conversion)
$ ls
psd_dir/ pdf_dir
Use ImageMagick
for file in `ls psd_dir`; do
#Extension removal
base=`basename "${file}" .psd`
#conversion
convert -flatten -density 300 -compress zip psd_dir/"${base}".psd pdf_dir/"${base}".pdf;
done
reference -To remove directories and extensions from file names -Convert cover image file to PDF file Resolution 350dpi
Recommended Posts