...
Code Block | ||
---|---|---|
| ||
var doc = $Documents.New('My Document'); doc.Files.AddPDF('<p>Hello</p>', 'report.pdf'); // content of a document doc.Publish(["myfolder", "otherfolder"]); // folders in which the document will be published (this is very important for saving a new document) doc.Title = 'Sample Document'; // making some changes on an existing document doc.Save(); // saving the changes (only after the document is already published) |
Examples
Code Block | ||
---|---|---|
| ||
var doc = $Documents.New('My Document');
doc.Files.AddPDF('<p>Hello</p>', 'report.pdf'); // content of a document
doc.Publish(["myfolder", "otherfolder"]); // folders in which the document will be published (this is very important for saving a new document)
doc.Title = 'Sample Document'; // making some changes on an existing document
doc.Save(); // saving the changes (only after the document is already published) |