2015-12-03 88 views
0

我试着做用PDFTron转换.PPT文件与Windows pdfnet/pdftron 8.1商店应用为.pdf

文件转换我有一些看起来像这样:

try 
{ 
    docpdf = new pdftron.PDF.PDFDoc(); 
    string fullpath = ApplicationData.Current.LocalFolder.Path +"\\"+ Constants.DataDirectory + "\\" + document.GetFullPath().Replace("/", "\\"); 

    pdftron.PDF.Convert.ToPdf(docpdf, fullpath); 
    StorageFile fileConverted = await currentFolder.CreateFileAsync(docpdf.GetDocInfo().GetTitle(), CreationCollisionOption.ReplaceExisting); 
    await docpdf.SaveToNewLocationAsync(fileConverted, pdftron.SDF.SDFDocSaveOptions.e_linearized); 

    MyPDFViewCtrl.SetDoc(docpdf); 
    MyPDFViewCtrl.SetPageViewMode(pdftron.PDF.PDFViewCtrlPageViewMode.e_fit_width); 
} 
catch (Exception e) 
{ 
    Debug.WriteLine(e.Message); 
} 

,但我得到Convert.ToPdf行上的一个例外

The text associated with this error code could not be found.

Exception: Message: An error occurred while converting the file. Detailed error: ToPDF cannot convert this file format on this platform. Conditional expression: false Filename : Convert.cpp
Function : trn::PDF::Convert::ToPdf Linenumber : 1825

在Windows 8商店应用上不可能吗?

回答

1

将PPT转换为PDF不适用于PDFNet SDK for Windows商店应用程序。使用Office Interop在PDFNet SDK for Windows(桌面/服务器,可从https://www.pdftron.com/pdfnet/downloads.html下载的PDFNet SDK变体)上支持这些文件类型的转换。一些PDFNet用户会做的是将这些文档发送到他们的服务器上,然后将它们转换为该服务器上的PDF,然后将它们发送回设备。

我们也刚刚发布了direct DOCX to PDF转换适用于所有平台PDFNet可用,包括Windows通用。 PPTX支持将在几个月后发布。

相关问题