Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functions to encrypt PDFs for pdf version 1.3 #2959

Merged
merged 51 commits into from
Oct 28, 2020
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d0d7803
Add functions to encrypt pdfs for pdf version 1.3
owenl131 Oct 14, 2020
3aab47c
Undo formatting changes
owenl131 Oct 14, 2020
7f9994b
Run prettier
owenl131 Oct 14, 2020
86111a5
Handle encryption options when creating pdf
owenl131 Oct 15, 2020
a9666b9
Merge branch 'master' into master
owenl131 Oct 15, 2020
b4f2580
Add dist updates
owenl131 Oct 15, 2020
eb83014
Run prettier
owenl131 Oct 15, 2020
d8cf042
Update modules.conf
owenl131 Oct 15, 2020
3eb7000
Fix node tests
owenl131 Oct 15, 2020
1e44bf6
Stop using javascript class syntax
owenl131 Oct 15, 2020
d86d132
Remove lambdas
owenl131 Oct 15, 2020
7a7e1c7
Remove spread operator
owenl131 Oct 15, 2020
3ed62df
Merge branch 'master' into master
owenl131 Oct 15, 2020
3234457
Add example
owenl131 Oct 15, 2020
5606c3d
Merge branch 'master' of https://github.com/owenl131/jsPDF
owenl131 Oct 15, 2020
e85d096
Restore dist/ folder from upstream
owenl131 Oct 21, 2020
89ca254
Add license headers
owenl131 Oct 21, 2020
492f5ac
Add type annotations
owenl131 Oct 21, 2020
e083cbb
Add unit tests and reference pdfs
owenl131 Oct 21, 2020
68b9158
Make reset file work with encrypted file
owenl131 Oct 21, 2020
fae4efb
Fix typo
owenl131 Oct 21, 2020
199bd74
Change to IE compatible functions
owenl131 Oct 21, 2020
6663afc
Run prettier
owenl131 Oct 21, 2020
5acf3d5
Escape strings and encrypt strings in annotations module
owenl131 Oct 21, 2020
4bad3b0
Add example for annotations
owenl131 Oct 21, 2020
7cdf05d
Change reference pdf for closed annotation after pdfescaping the strings
owenl131 Oct 21, 2020
b63c324
Change reference pdf for open annotation after pdfescaping the strings
owenl131 Oct 21, 2020
1e45c88
Encrypt strings in acroforms modules
owenl131 Oct 22, 2020
f31288d
Allow default encryptor in test
owenl131 Oct 22, 2020
13b40a9
Fix problem with default appearance stream for textfields
owenl131 Oct 23, 2020
0a94bad
Add reference pdf for encryption with acroforms
owenl131 Oct 23, 2020
31cc347
Add writable to value
owenl131 Oct 23, 2020
ecbdef5
Fix error
owenl131 Oct 23, 2020
1e91e36
Fix typos of writable throughout code
owenl131 Oct 23, 2020
0cb9e42
Remove line setting subtype
owenl131 Oct 24, 2020
382ab43
Replace reference file
owenl131 Oct 24, 2020
6ee0037
Change float precision to 2 in test
owenl131 Oct 24, 2020
3e5a54b
Prompt rebuild
owenl131 Oct 24, 2020
dfb6c90
Merge branch 'master' into master
owenl131 Oct 26, 2020
0b650b7
Prompt rebuild
owenl131 Oct 26, 2020
9c39afd
getEncryptor should only be in the internal API
owenl131 Oct 26, 2020
cd61f7a
Add check for test environment
owenl131 Oct 26, 2020
f51c603
Add getEncryptor under API.internal in types
owenl131 Oct 26, 2020
cf9e168
Clean up after encryption tests
owenl131 Oct 26, 2020
ca9a864
Put guards around calls to scope.internal
owenl131 Oct 26, 2020
7599add
Remove global scope in acroform module
owenl131 Oct 27, 2020
d494636
Remove unnecessary scope assignments
owenl131 Oct 28, 2020
3a99d56
Remove console log
owenl131 Oct 28, 2020
f02c630
Refactor code
owenl131 Oct 28, 2020
f995b8c
Remove unnecessary statements
owenl131 Oct 28, 2020
748ebfb
Merge branch 'master' into master
HackbrettXXX Oct 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
917 changes: 705 additions & 212 deletions dist/jspdf.es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jspdf.es.js.map

Large diffs are not rendered by default.

69 changes: 40 additions & 29 deletions dist/jspdf.es.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jspdf.es.min.js.map

Large diffs are not rendered by default.

915 changes: 704 additions & 211 deletions dist/jspdf.node.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jspdf.node.js.map

Large diffs are not rendered by default.

67 changes: 39 additions & 28 deletions dist/jspdf.node.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jspdf.node.min.js.map

Large diffs are not rendered by default.

923 changes: 708 additions & 215 deletions dist/jspdf.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jspdf.umd.js.map

Large diffs are not rendered by default.

77 changes: 44 additions & 33 deletions dist/jspdf.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jspdf.umd.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/polyfills.es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/polyfills.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions examples/js/editor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions examples/js/password.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var doc = new jsPDF({
encryption: {
userPassword: "user",
ownerPassword: "owner",
userPermissions: ["print", "modify", "copy", "annot-forms"]
// try changing the user permissions granted
}
});

doc.setFontSize(40);
doc.text("Octonyan loves jsPDF", 35, 25);
doc.addImage("examples/images/Octonyan.jpg", "JPEG", 15, 40, 180, 180);
Loading