jsPDF Annotations PlugIn
There are many types of annotations in a PDF document. Annotations are placed
on a page at a particular location. They are not 'attached' to an object.
This plugin current supports
The destination magnification factor can also be specified when goto is a page number or a named destination. (see documentation below) (set magFactor in options). XYZ is the default.
Links, Text, Popup, and FreeText are supported.
Options In PDF spec Not Implemented Yet
- Source:
Methods
(inner) createAnnotation(options)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
(inner) getTextWidth(text) → {number}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
text |
string |
Returns:
txtWidth
- Type
- number
(inner) link(x, y, w, h, options)
- Source:
Create a link
valid options
If pageNumber is specified, top and zoom may also be specified
Parameters:
Name | Type | Description |
---|---|---|
x |
number | |
y |
number | |
w |
number | |
h |
number | |
options |
Object |
(inner) textWithLink(text, x, y, options) → {number}
- Source:
Currently only supports single line text. Returns the width of the text/link
Parameters:
Name | Type | Description |
---|---|---|
text |
string | |
x |
number | |
y |
number | |
options |
Object |
Returns:
width the width of the text/link
- Type
- number