So someone recently sent me a load of Word 2007 documents that had musical scores embedded as pictures. Nice and easy to convert these (losslessly) into PDF’s with one image per page using this img2pdf script
1 2 3 4 5 6 7 8 9 10 |
for i in *.docx; do pushd proc; mkdir t; pushd t; unzip ../../"$i"; popd; python img2pdf.py -o "${i%.docx}.pdf" `find -name \*.png | sort`; rm -fr t; popd; done |