Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用winrt中的syncfusion从已创建的excel创建PDF_C#_Excel_Pdf_Winrt Xaml_Syncfusion - Fatal编程技术网

C# 使用winrt中的syncfusion从已创建的excel创建PDF

C# 使用winrt中的syncfusion从已创建的excel创建PDF,c#,excel,pdf,winrt-xaml,syncfusion,C#,Excel,Pdf,Winrt Xaml,Syncfusion,我正在使用syncfusion方法创建excel工作表。现在我想创建相同格式的pdf。我查看了syncfusion的示例代码及其非常复杂的部分。那么,是否有任何方法可以使用已经创建的EXCEL来生成PDF呢 我使用此代码创建excel Assembly executingAssembly = typeof(MainPage).GetTypeInfo().Assembly; Stream inputStream = executingAssembly.GetManifest

我正在使用syncfusion方法创建excel工作表。现在我想创建相同格式的pdf。我查看了syncfusion的示例代码及其非常复杂的部分。那么,是否有任何方法可以使用已经创建的EXCEL来生成PDF呢

我使用此代码创建excel

Assembly executingAssembly = typeof(MainPage).GetTypeInfo().Assembly;
            Stream inputStream = executingAssembly.GetManifestResourceStream("CRICKIT.Assets.TVM.xlsx");

            IWorkbook book = await this.excelEngine.Excel.Workbooks.OpenAsync(inputStream);
            inputStream.Dispose();

            //Create Template Marker Processor
            ITemplateMarkersProcessor marker = book.CreateTemplateMarkersProcessor();
            //Binding the business object with the marker.
            marker.AddVariable("TVMManager", App.ViewModel.TVMManager);

            //Applies the marker.
            marker.ApplyMarkers(UnknownVariableAction.Skip);
            return book;

目前,Syncfusion Essential XlsIO WINRT控件不支持将excel工作表转换为PDF文档

谢谢,
Sridhar.S

SyncFusion本身提供了一种将Excel电子表格转换为PDF的方法,如果您拥有Essential Studio的PDF部分

下面是如何进行转换的示例:

最简单的形式如下所示:

//Open the Excel document to convert
ExcelToPdfConverter converter=new ExcelToPdfConverter("Sample.xlsx");
//Convert Excel document into PDF document
PdfDocument pdfDoc = converter.Convert();
pdfDoc.Save("ExceltoPDF.pdf");

希望这有帮助。

欢迎来到Stackoverflow。这不适合这里。到目前为止你有试过什么吗?先表现出你的努力,这样人们才能表现出他们的努力。请阅读,如果转换是不可能的,那么有任何方法来创建新的pdf。我试过融合,但太难了。