Welcome to the WPF feedback portal. We’re happy you’re here! If you have feedback on how to improve the WPF, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

3
Votes

I have a .NET Core 3.1 console app (netcoreapp3.1) that does Word to PDF conversion.

I switched from using Syncfusion .NET Core nuget packages to WPF packages because EMF image conversion did not work in .NET Core packages but they do in WPF packages.

I switched based on this note in DocIO Nuget Packages Required page:

Starting with v17.3.0.x, Syncfusion provides support to .NET Core 3.0. You can use the above WPF or Windows Forms platform NuGet packages for .NET Core 3.0 targeting applications and use the same “C# tab” code examples for it. 

When converting a Word document that has a chart to PDF, I get this error:

Could not load file or assembly 'PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.


I also tried the WinForms nuget packages and get the same error.


The stack trace reveals this is thrown by Syncfusion.OfficeChartToImageConverter.ChartToImageConverer.SaveAsImage (below).

Does this mean that converting a Word document with charts to PDF requires .NET Framework and will not work in .NET Core 3?


Sample project attached that throws error.

Thanks,

Philip


Stack Trace

at
Syncfusion.OfficeChartToImageConverter.ChartToImageConverter.SaveAsImage(IOfficeChart
excelChart, Stream imageAsStream) at
Syncfusion.OfficeChart.Implementation.Charts.ChartImpl.SaveAsImage(Stream
imageAsstream)   at
Syncfusion.DocToPdfConverter.Rendering.PDFDrawingContext.DrawChart(WChart
chart, LayoutedWidget widget)   at
Syncfusion.DocToPdfConverter.Rendering.PDFDrawingContext.Draw(WChart chart,
LayoutedWidget ltWidget)   at
Syncfusion.DocToPdfConverter.Rendering.PDFDrawingContext.Draw(IWidget widget,
LayoutedWidget layoutedWidget)   at
Syncfusion.DocToPdfConverter.Rendering.PDFDrawingContext.Draw(LayoutedWidget
layoutedWidget, Boolean isHaveToInitLayoutInfo)   at
Syncfusion.DocToPdfConverter.Rendering.PDFDrawingContext.Draw(LayoutedWidget
layoutedWidget, Boolean isHaveToInitLayoutInfo)   at
Syncfusion.DocToPdfConverter.Rendering.PDFDrawingContext.Draw(LayoutedWidget
layoutedWidget, Boolean isHaveToInitLayoutInfo) at
Syncfusion.DocToPdfConverter.Rendering.PDFDrawingContext.Draw(LayoutedWidget
layoutedWidget, Boolean isHaveToInitLayoutInfo) at
Syncfusion.DocToPdfConverter.Rendering.PDFDrawingContext.Draw(LayoutedWidget
layoutedWidget, Boolean isHaveToInitLayoutInfo)   at
Syncfusion.DocToPdfConverter.Rendering.PDFDrawingContext.Draw(Page page,
Int32& autoTagsCount)   at
Syncfusion.DocToPDFConverter.DocToPDFConverter.DrawDirectWordToPDF(DocumentLayouter
layouter)   at
Syncfusion.DocToPDFConverter.DocToPDFConverter.ConvertToPDF(WordDocument
wordDocument)