有没有人有我可以嵌入到 ASP.NET Web 应用程序中的 PowerPoint 查看器?
问问题
3860 次
3 回答
0
如果您使用的是 Silverlight,您可以使用
于 2010-12-16T14:27:15.173 回答
0
您不能直接嵌入 PPT/演示文稿来查看。相反,您可以尝试任何允许您将 PPT 幻灯片嵌入为图像或客户端浏览器可以呈现给用户的其他格式的转换器。很少有像 GroupDocs 查看器或 Doconut 查看器这样的产品可以做到这一点。你可以试一试。
于 2019-08-01T12:20:11.130 回答
0
您必须将 PowerPoint 幻灯片转换为可以嵌入到您的网页中的形式,即图像或 HTML 页面。您可以尝试使用 GroupDocs.Viewer for .NET,它允许将演示文稿幻灯片呈现为高保真图像 (PNG/JPG) 或 HTML 页面。然后,您可以将呈现的页面嵌入到您的网页中以预览幻灯片。这是您可以渲染幻灯片的方式:
渲染为图像:
using GroupDocs.Viewer.Options;
// Set output path
string OutputPagePathFormat = Path.Combine("C:\\output", "page_{0}.png");
// Render document pages
using (Viewer viewer = new Viewer("C:\\sample.pptx"))
{
PngViewOptions options = new PngViewOptions(OutputPagePathFormat);
viewer.View(options);
// Rendered images will be saved in the D:\output\ directory.
}
呈现为 HTML:
using GroupDocs.Viewer.Options;
// The file path format
string OutputPagePathFormat = Path.Combine("C:\\output","page-{0}.html");
using (Viewer viewer = new Viewer("C:\\sample.pptx"))
{
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources(OutputPagePathFormat);
viewer.View(options);
}
披露:我在 GroupDocs 担任开发人员布道师。
于 2019-09-04T15:39:39.850 回答