Skip to main content

Macro to create cropped PDFs from PS files [Resolved]

I have postscript PS images and have written a macro to convert to PDF and then crop to their boundingbox size. The code works fine, but I imagine there is a more straightforward way of doing this. Any help, appreciated. Thanks.

##!/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

Question Credit: Markys
Question Reference
Asked July 21, 2019
Tags:
Posted Under: Unix Linux
23 views
1 Answers

Your Answer
D:\Adnan\Candoerz\CandoProject\vQA