Documents are created with the User.createDocument API.
options.document(Blob | File | URL) The document itself.
options.name(string) The name of the document
options.isPublic?(boolean, optional) Sets whether or not the document is public. More information here
options.id?(string | number, optional) If you want to assign a specific ID to the document, set it here. Otherwise, one will be generated by the database.
Returns an instance of Document.
Creating a document does not display it in the viewer. To display the document, use the
file(Blob | File | URL) The file you want to load. Since PDFTron Collaboration does not handle file storage, the actual document must be provided for display (see more info here)
Returns a promise that resolves once the file is loaded.
See the getting user documents guide for more information on getting a list of a user's documents.