Skip to content

Commit

Permalink
Chore: Enable PDF signatures in future builds of PDF.js (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Press committed Oct 23, 2018
1 parent 47498e9 commit 4d61afa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build/upgrade_pdfjs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,11 @@ echo "--------------------------------------------------------------------------
echo "Decreasing # of cached pages on mobile web"
echo "-----------------------------------------------------------------------------------"
sed -e 's@var DEFAULT_CACHE_SIZE = 10;@var DEFAULT_CACHE_SIZE = /iphone|ipad|ipod|android|blackberry|bb10|mini|windows\sce|palm/i.test(navigator.userAgent) ? 5 : 10;@' -i '' src/third-party/doc/$DOC_STATIC_ASSETS_VERSION/pdf_viewer.js

# Deletes code hiding PDF signatures.
# For preview purposes, it is acceptable to show signatures without verifying them.
echo "-----------------------------------------------------------------------------------"
echo "Enabling PDF signatures"
echo "-----------------------------------------------------------------------------------"
# Deletes a block of code that starts with `if (data.fieldType === 'Sig') {``, and ends with `}`
sed -e "/if (data.fieldType === 'Sig') {/,/}/d" -i '' src/third-party/doc/$DOC_STATIC_ASSETS_VERSION/pdf.worker.js

0 comments on commit 4d61afa

Please sign in to comment.