- Home
- Forum
- ASP.NET Core - EJ 2
- The problem with the ASP.NET Core service file conversion from .pptx to .pdf or .jpeg
The problem with the ASP.NET Core service file conversion from .pptx to .pdf or .jpeg
Hello,
I have implemented a backend service Controller in our ASP.NET Core project based on your examples, which converts .pptx files to files with .pdf or .jpeg extensions. However, unfortunately I am facing an issue in which not all data of a given file (some charts and tables are missing from the result file) is being converted properly as it should in any of those converting methods.
I am using the following NuGet Packages:
- Syncfusion.Presentation - v19.2.0.59
- Syncfusion.PresentationToPdfConverter - v19.2.0.59
- Syncfusion.PresentationRenderer - v19.2.0.59
- Syncfusion.EJ2.PdfViewer - v19.2.0.59
Attachment: test_ddf5e78.rar
Thank you for contacting Syncfusion support.
We have reproduced the reported issue with “Chart and shapes not preserved properly while converting a PPTX document to PDF” in our end and we suspect it to be a defect. We will validate and share the details on 25th November 2021.
Please let us know if you have any other queries.
Regards,
Manikandan Ravichandran
Thank you for your patience.
On further checking the given document, we have found that the missing charts and table are images with EMF format. Image Formats such as “wmf” and “emf” are limitation in the .NET Core targeted applications. So, those images will not preserve in Presentation document to PDF conversion using Essential Presentation.
To preserve the expected images in the PDF, we suggest you convert the metafile image formats to bitmap image format (JPEG or PNG) and then perform Presentation to PDF conversion.
Please refer the Notes tab in the below link.
https://help.syncfusion.com/file-formats/presentation/presentation-to-pdf
Please let us know if you have any other questions.
Regards,
Manikandan Ravichandran
Hello Manikandan,
Thank you for a quick response.
I would like to ask you if you are planning to add supports for "emf" and "wmf" image formats in NuGet packages of ASP.NET Core targeted applications?
Best Regards,
Ignacy Mielniczek
Thank you for your update.
Due to platform limitation, we unable to provide metafile support in .net core platform. As mentioned earlier, you can convert the metafile image formats to bitmap image format (JPEG or PNG) and then perform Presentation to PDF conversion
Regards,
Manikandan Ravichandran
Hi Manikandan,
Could you tell me if it is possible to convert "emf" and "wmf" image formats to a bitmap image format in ASP.NET Core targeted applications? Or is it only possible in an application written in other frameworks like just regular ASP.NET?
I am asking this because there are some missing NuGet packages in ASP.NET Core (e.g. ChartToImageConverter).
Thanks in advanc
Best Regards,
Ignacy Mielniczek
Reg - if it is possible to convert "emf" and "wmf" image formats to a bitmap image format in ASP.NET Core targeted applications?
We have prepared the sample to convert the EMF images to PNG in .net core platform in Windows environment and attached to itself and this will work only in Windows environment since System.Drawing.Common supported only in Windows environment.
Sample link:
https://www.syncfusion.com/downloads/support/forum/170638/ze/ImageConversionSample-1444189591
Please refer the below links to know more about the metafile image support.
https://docs.microsoft.com/en-us/dotnet/api/system.drawing.imaging.metafile?view=netcore-3.0
https://docs.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only
Reg - is it only possible in an application written in other frameworks like just regular ASP.NET?
Yes, you can create an application in other frameworks to get EMF support in PDF conversion.
Please refer the below links to know about the NuGet packages required for ASP.NET MVC5
https://help.syncfusion.com/file-formats/presentation/nuget-packages-required#converting-powerpoint-presentation-into-pdf
The following NuGet package is required to be referred in addition to the above mentioned packages for converting the chart present in the PowerPoint Presentation into PDF other than net core applications..
https://help.syncfusion.com/file-formats/presentation/nuget-packages-required#converting-charts-in-presentation
Regards,
Manikandan Ravichandran
- 6 Replies
- 2 Participants
-
IM Ignacy Mielniczek
- Nov 22, 2021 07:18 PM UTC
- Dec 30, 2021 11:37 AM UTC