Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add functions to encrypt PDFs for pdf version 1.3 (#2959)
Co-authored-by: Lukas Holländer <lukas.hollaender@yworks.com>
- Loading branch information
1 parent
d032321
commit c44b9c1
Showing
25 changed files
with
1,350 additions
and
549 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var doc = new jsPDF({ | ||
unit: "px", | ||
format: [200, 300], | ||
floatPrecision: 2, | ||
}); | ||
|
||
doc.textWithLink("Click me!", 10, 10, { | ||
url: "https://parall.ax/", | ||
}); | ||
doc.createAnnotation({ | ||
type: "text", | ||
title: "note", | ||
bounds: { | ||
x: 10, | ||
y: 10, | ||
w: 200, | ||
h: 80 | ||
}, | ||
contents: "This is text annotation (closed by default)", | ||
open: false | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Oops, something went wrong.