Syncfusion.XpsToPdfConverter.Net.Core 19.2.0.55 throws System.Drawing is not supported in this platform

Hello,

I am trying to convert XPS to PDF using Syncfusion.XpsToPdfConverter.Net.Core 19.2.0.55 as described here : https://help.syncfusion.com/file-formats/pdf/working-with-document-conversions#converting-xps-document-to-pdf

My problem now is it throws 
System.PlatformNotSupportedException.

Here is the stacktrace : 

   at System.Drawing.Drawing2D.GraphicsPath..ctor()
   at Syncfusion.XPS.XPSRenderer.GetPathFromGeometry(String pathData)
   at Syncfusion.XPS.XPSRenderer.DrawPath(Path path, PdfGraphics Graphics)
   at Syncfusion.XPS.XPSParser.EnumerateXPSPage()
   at Syncfusion.XPS.XPSParser.Enumerate()
   at Syncfusion.XPS.XPSToPdfConverter.Convert(Stream file)

Can someone help us resolve this issue?
By the way, this is an UWP app. :)

Thank you very much.


3 Replies

GK Gowthamraj Kumar Syncfusion Team August 12, 2021 10:55 AM UTC

Hi Dennis, 
 
Thank you for contacting Syncfusion support.

We have analyzed the reported issue “using .NET NuGet package in UWP application”, but this NuGet only works on ASP.NET Core application and not in UWP platforms. However, we can able to convert the XPS to PDF document using Syncfusion.Pdf.UWP NuGet package. Please try this package in your end and let us know the result.
 
 
Please refer the below UG documentation link for more details,   
    
Regards, 
Gowthamraj K 



DA Dennis Arriola August 13, 2021 06:01 AM UTC

Hello Gowthamraj K,

Thanks for your response. 
I was able to successfully convert XPS to PDF now.

All the best,
Dennis A.



GK Gowthamraj Kumar Syncfusion Team August 13, 2021 06:15 AM UTC

Hi Dennis, 
 
Thank you for your update. We are glad to know that your problem has been solved. 

 Please let us know if you need any further assistance with this. 
 
Regards,  
Gowthamraj K 


Loader.
Up arrow icon