
cd ~/installed/js/pdfjs-install
VERSION_NUM="2.6.347"
VERSION="pdfjs-${VERSION_NUM}-dist" # pdfjs-2.4.456-es5-dist -- prev: 2.4.456

open https://github.com/mozilla/pdf.js/releases/tag/v$VERSION_NUM

wget https://github.com/mozilla/pdf.js/releases/download/v$VERSION_NUM/$VERSION.zip
unzip $VERSION.zip -d $VERSION -y

# wget -r -k https://$VERSION/web/viewer.html
# wget -r -k https://$VERSION/build/pdf.worker.js

# cp -r $VERSION/web/locale /Volumes/nc/nc-designer/public
# cp -r $VERSION/web/images /Volumes/nc/nc-designer/public
cp -r $VERSION/web/locale /Volumes/nc/nc-designer/src/lib/pdfjs/web
cp -r $VERSION/web/images /Volumes/nc/nc-designer/src/lib/pdfjs/web
cp -r $VERSION/build/pdf.js /Volumes/nc/nc-designer/src/lib/pdfjs/build/pdf.js
cp -r $VERSION/build/pdf.worker.js /Volumes/nc/nc-designer/src/lib/pdfjs/build/pdf.worker.js
cp -r $VERSION/web/viewer.css /Volumes/nc/nc-designer/src/lib/pdfjs/web/viewer.css
cp -r $VERSION/web/viewer.js /Volumes/nc/nc-designer/src/lib/pdfjs/web/viewer.js
sed -i '' -e 's/compressed.tracemonkey-pldi-09.pdf//g' /Volumes/nc/nc-designer/src/lib/pdfjs/web/viewer.js
