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:

  1. Syncfusion.Presentation - v19.2.0.59
  2. Syncfusion.PresentationToPdfConverter  - v19.2.0.59
  3. Syncfusion.PresentationRenderer  - v19.2.0.59
  4. Syncfusion.EJ2.PdfViewer - v19.2.0.59
And I have also attached an example file which is not being correctly imported.

Best Regards,
Ignacy Mielniczek

Attachment: test_ddf5e78.rar

6 Replies

MR Manikandan Ravichandran Syncfusion Team November 23, 2021 03:53 PM UTC

Hi Ignacy,

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



MR Manikandan Ravichandran Syncfusion Team November 24, 2021 11:22 AM UTC

Hi Ignacy,

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 



IM Ignacy Mielniczek December 28, 2021 04:26 PM UTC

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



MR Manikandan Ravichandran Syncfusion Team December 29, 2021 09:12 AM UTC

Hi Ignacy,

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 



IM Ignacy Mielniczek December 29, 2021 02:37 PM UTC

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



MR Manikandan Ravichandran Syncfusion Team December 30, 2021 11:37 AM UTC

Hi Ignacy,

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
 


Loader.
Up arrow icon