I am working on a React Application. I am unable to display EMF images on user interface. I am restricted to use only Chrome & Edge as browsers.
The workflow is -
- Users can copy & paste any rich text from word document on the UI.
- Rich text with EMF images are displayed as empty broken image boxes on the UI.
- I am retrieving the image from the rich text format and convert it to base64 before rendering it via HTML.
- When I explicitly copy & paste only the image(then the type changes to png) and it doesn't break. However when the entire word doc content is copied & pasted (image type remains as EMF), that is when I see the broken image.
I am still a beginner in React and tried searching for the solution online, but didn't come across anything specific to React JS. Is it possible to convert emf images into other supported image types? Are there any libraries or packages compatible with React JS? Is there a way by which I can achieve this use case? Open to other suggestions or approach.
Thanks.