Output

WebDocument.Output 属性

返回文档的输出元素集合。只读 Output

public Output Output { get; }

示例

[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);

    // 将 "index.html" 添加到输出文件,使用 "index" 模板生成它,并将 pres 变量作为模型
    document.Output.Add("index.html", "index", pres);

    // ... 设置文档的其他选项,然后保存文档
    document.Save();
}

另请参阅