public class WebDocument
extends java.lang.Object
Represents a transition form of the presentation for saving into a web format.
Constructor and Description |
---|
WebDocument(WebDocumentOptions options)
WebDocument constructor. |
Modifier and Type | Method and Description |
---|---|
Storage |
getGlobal()
Returns global storage of the document.
|
Input |
getInput()
Returns collection of input elements (templates) of the document.
|
Output |
getOutput()
Returns collection of output elements of the document.
|
void |
save()
Saves the document output.
|
public WebDocument(WebDocumentOptions options)
WebDocument
constructor.
options
- Options set for the document.public final void save()
Saves the document output.
public final Input getInput()
Returns collection of input elements (templates) of the document.
Read-only Input
(getInput()
).
public final Output getOutput()
Returns collection of output elements of the document.
Read-only Output
(getOutput()
).
[C#] using (Presentation pres = new Presentation("pres.pptx")) { var options = new WebDocumentOptions { TemplateEngine = new RazorTemplateEngine(), OutputSaver = new FileOutputSaver(), EmbedImages = false }; WebDocument document = new WebDocument(options); // add "index.html" to output files, using "index" template to generate it and pres variable as model document.Output.Add("index.html", "index", pres); // ... set up other options of the document and then save the document document.Save(); }
public final Storage getGlobal()
Returns global storage of the document.
Read-only Storage
.
Using thisGlobal
(getGlobal()
) property (implementation ofStorage
interface) a property can be put to use it later in the template:[C#] var options = new WebDocumentOptions { TemplateEngine = new RazorTemplateEngine(), OutputSaver = new FileOutputSaver(), EmbedImages = false }; WebDocument document = new WebDocument(options); // put "slideMargin" property to use from templates document.Global.Put("slideMargin", 10); // ... set up other options of the document and then save the document document.Save();
Copyright © 2004-2021 Aspose Pty Ltd. All Rights Reserved.