Css @media print styles are not applied on html to wordx

Hi guys,

We are investigating the aspose word to use in our .NET project. The task it to load the html from remote url and convert it in memory to wordx file. Everything work just fine, except css @media print styles - seems it’s not applies to the word document.

Could you please advise what i’m doing wrong?

My code is:

using (var webClient = new WebClient())
{
var dataBytes = webClient.DownloadData(url);

            using (var byteStream = new MemoryStream(dataBytes))
            {
                var loadOptions = new LoadOptions
                                  {
                                      LoadFormat = LoadFormat.Html,
                                      BaseUri = url
                                  };
                
                var doc = new Document(byteStream, loadOptions);                    
                doc.Save(@"E:\Temp\converted_document.docx", SaveFormat.Docx);
            }
        }

Thanks,
Evgeny.

@johnymotorhead,

Have you tried the latest version of Aspose.Words for .NET i.e. 19.8 on your end? In case the problem still remains, please ZIP and upload your simplified input HTML file and Aspose.Words generated DOCX file showing the undesired behavior here for testing. We will then investigate the issue on our end and provide you more information.