Back to Jspdf

vFS

docs/module-vFS.html

4.2.11.4 KB
Original Source

Use the vFS to handle files

Source:

Methods

(inner) addFileToVFS(filename, filecontent) → {jsPDF}

Source:

Add a file to the vFS

Example
doc.addFileToVFS("someFile.txt", "BADFACE1");
Parameters:
NameTypeDescription
filenamestring

The name of the file which should be added.

| | filecontent | string |

The content of the file.

|

Returns:

Type jsPDF

(inner) existsFileInVFS(Possible) → {boolean}

Source:

Check if the file exists in the vFS

Example
doc.existsFileInVFS("someFile.txt");
Parameters:
NameTypeDescription
Possiblestring

filename in the vFS.

|

Returns:

Type boolean

(inner) getFileFromVFS(The) → {string}

Source:

Get the file from the vFS

Example
doc.getFileFromVFS("someFile.txt");
Parameters:
NameTypeDescription
Thestring

name of the file which gets requested.

|

Returns:

Type string