jsPDF html PlugIn
- Source:
Methods
(inner) html(source, optionsopt)
- Source:
Generate a PDF from an HTML element or string using.
Example
var doc = new jsPDF();
doc.html(document.body, {
callback: function (doc) {
doc.save();
},
x: 10,
y: 10
});
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
source |
HTMLElement | string | The source HTMLElement or a string containing HTML. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
<optional> |
Collection of settings Properties
|
Type Definitions
FontFace
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
family |
string | The name of the font-family. |
|
style |
string | undefined | The style that this font-face defines, e.g. 'italic'. |
|
weight |
string | number | undefined | The weight of the font, either as a string or a number (400, 500, 600, e.g.) |
|
stretch |
string | undefined | The stretch of the font, e.g. condensed, normal, expanded. |
|
src |
Array.<Object> | A list of URLs from where fonts of various formats can be fetched. |
|
src |
string |
<optional> |
url A URL to a font of a specific format. |
src |
string |
<optional> |
format Format of the font referenced by the URL. |