com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class WebDocument

  • java.lang.Object
    • com.aspose.slides.WebDocument


  • public class WebDocument
    extends java.lang.Object

    Represents a transition form of the presentation for saving into a web format.

    • Constructor Detail

    • Method Detail

      • save

        public final void save()

        Saves the document output.

      • getInput

        public final Input getInput()

        Returns collection of input elements (templates) of the document. Read-only Input(getInput()).

      • getOutput

        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();
          }
          
      • getGlobal

        public final Storage getGlobal()

        Returns global storage of the document. Read-only Storage.


        Using this  Global(getGlobal()) property (implementation of Storage 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();