Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: improve output documentation #3099

Merged
merged 1 commit into from Feb 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 14 additions & 4 deletions src/jspdf.js
Expand Up @@ -3017,12 +3017,22 @@ function jsPDF(options) {
*
* If `type` argument is undefined, output is raw body of resulting PDF returned as a string.
*
* @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'.
* @param {Object} options An object providing some additional signalling to PDF generator. Possible options are 'filename'.
*
* @param {string} type A string identifying one of the possible output types.<br/>
* Possible values are: <br/>
* 'arraybuffer' -> (ArrayBuffer)<br/>
* 'blob' -> (Blob)<br/>
* 'bloburi'/'bloburl' -> (string)<br/>
* 'datauristring'/'dataurlstring' -> (string)<br/>
* 'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring<br/>
* 'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)<br/>
* 'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)<br/>
* 'pdfjsnewwindow' -> (wind | null)
* @param {Object|string} options An object providing some additional signalling to PDF generator.<br/>
* Possible options are 'filename'.<br/>
* A string can be passed instead of {filename:string} and defaults to 'generated.pdf'
* @function
* @instance
* @returns {jsPDF}
* @returns {string|window|ArrayBuffer|Blob|jsPDF|null|undefined}
* @memberof jsPDF#
* @name output
*/
Expand Down