I am using the telerik document format providers to read an RTF and convert it to a DOCX format. the document contains embedded images in PNG format, but looking at the output of the DOCX it looks like the images have been converted to WMF format. Is there a way to preserve the original image type?
I have tested this and it works as expected on my side. It depends on how this image is saved in the RTF file. For example, if the file is created with WordPad even if a PNG image is added, it is stored as WMF and when converting the format is preserved and a WMF image is used. You can examine this by opening the RTF file with a text editor. If the "wmetafile" tag is used the image is stored as WMF (see attached), the "pngblip" indicates a PNG image. More information is available here: Rich Text Format (RTF) Version 1.5 Specification.
Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.