Loss in image quality while saving Word document as Filtered Web Page?

Jayashri V 1 Reputation point
2021-02-10T16:54:18.937+00:00

I am writing a Word to HTML converter. I am using the approach of saving Word file as Filtered HTML to carry out the conversion. I have automated this process using Microsoft.Office.Interop.Word for every Word document input that has to be converted. But, I see that the images are getting compressed regardless of the settings explained in office-docuemnt-image-quality-loss . The quality of screenshot images embedded in the word document becomes very poor after conversion to filtered html.

Unfortunately, manual replacement of the images with the original quality images cannot be done because of the sheer volume and size of the word documents. Zipping the docx file and accessing the native images does not help me, as these images are differently numbered from the filtered html images. The order is especially affected when shapes and icons are present in the word file.

Is there any way to remove such compression and have the image quality same as the original embedded images? Or, is there a better way to convert Word documents to HTML retaining the image quality?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,362 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,118 questions
Word Management
Word Management
Word: A family of Microsoft word processing software products for creating web, email, and print documents.Management: The act or process of organizing, handling, directing or controlling something.
891 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Daniel Zhang-MSFT 9,611 Reputation points
    2021-02-11T05:52:25.653+00:00

    Hi JayashriVenkatachalam,
    I have a suggestion that you can simply add the html code yourself to link the image from the source file, so you don't need to convert it.

    <img src="img.jpg" alt="image description">  
    

    Best Regards,
    Daniel Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments