该文将介绍如何使用spire.presentation for .net将opendocument 演示文稿(.odp)另存为pdf格式。
c#
using spire.presentation;
namespace odptopdf
{
class program
{
static void main(string[] args)
{
//加载示例文档
presentation presentation = new presentation();
presentation.loadfromfile("sample.odp",fileformat.odp);
presentation.savetofile("odptopdf.pdf",fileformat.pdf);
}
}
}
vb.net
imports spire.presentation
namespace odptopdf
class program
private shared sub main(byval args() as string)
'加载示例文档
dim presentation as presentation = new presentation
presentation.loadfromfile("sample.odp", fileformat.odp)
presentation.savetofile("odptopdf.pdf", fileformat.pdf)
end sub
end class
end namespace
效果图: