Sunday, February 5, 2023

Joining any files in PostScript or PDF

gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=bla.ps -f foo1.ps foo2.ps

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=bla.pdf -f foo1.pdf foo2.pdf

or

pdfunite foo1.pdf foo2.pdf result.pdf
 

or

all files (pdf) in directory:

 
ls -v *.pdf | bash -c 'IFS=$'"'"'\n'"'"' read -d "" -ra x;pdfunite "${x[@]}" output.pdf'
 

No comments:

Post a Comment