Skip to content

Commit 20f271a

Browse files
authored
Docs: improve output documentation (#3099)
1 parent d8bb3b3 commit 20f271a

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/jspdf.js

+14-4
Original file line numberDiff line numberDiff line change
@@ -3017,12 +3017,22 @@ function jsPDF(options) {
30173017
*
30183018
* If `type` argument is undefined, output is raw body of resulting PDF returned as a string.
30193019
*
3020-
* @param {string} type A string identifying one of the possible output types. Possible values are 'arraybuffer', 'blob', 'bloburi'/'bloburl', 'datauristring'/'dataurlstring', 'datauri'/'dataurl', 'dataurlnewwindow', 'pdfobjectnewwindow', 'pdfjsnewwindow'.
3021-
* @param {Object} options An object providing some additional signalling to PDF generator. Possible options are 'filename'.
3022-
*
3020+
* @param {string} type A string identifying one of the possible output types.<br/>
3021+
* Possible values are: <br/>
3022+
* 'arraybuffer' -> (ArrayBuffer)<br/>
3023+
* 'blob' -> (Blob)<br/>
3024+
* 'bloburi'/'bloburl' -> (string)<br/>
3025+
* 'datauristring'/'dataurlstring' -> (string)<br/>
3026+
* 'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring<br/>
3027+
* 'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)<br/>
3028+
* 'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)<br/>
3029+
* 'pdfjsnewwindow' -> (wind | null)
3030+
* @param {Object|string} options An object providing some additional signalling to PDF generator.<br/>
3031+
* Possible options are 'filename'.<br/>
3032+
* A string can be passed instead of {filename:string} and defaults to 'generated.pdf'
30233033
* @function
30243034
* @instance
3025-
* @returns {jsPDF}
3035+
* @returns {string|window|ArrayBuffer|Blob|jsPDF|null|undefined}
30263036
* @memberof jsPDF#
30273037
* @name output
30283038
*/

0 commit comments

Comments
 (0)