HTML to PDF conversion using Aspose.Words for underline CSS not working

Hi,

We have HTML with stle underline as text-decoration-line:underline on a tag. When we convert this to PDF using Aspose.Words, the underline is no longer seen.
But if we use text-decoration:underline, it works fine.

Could you please help understand whether we can get text-decoration-line:underline to working in any way and why Aspose.Words does not support it ?

We are using Aspose.Words for .NET version 14.10.0

Thanks,
Vaishnavi

@Makam

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input HTML document.
  • Please attach the output PDF file that shows the undesired behavior.
  • Please attach the expected output PDF file that shows the desired behavior.
  • Please share if you are using any PdfSaveOptions.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Please find the requested files attached.
Email.zip (110.5 KB)

We are generating PDF using below code -

using (MemoryStream inputMemoryStream = new MemoryStream(docData))
{
      LoadOptions loadOptions = new LoadOptions { ResourceLoadingCallback = new HtmlLinkedResourceLoadingCallback(images) };
      Document asposeWordDocument = new Document(inputMemoryStream, loadOptions);
                
      // Convert document to PDF.
      using (MemoryStream outputMemoryStream = new MemoryStream())
      {
            PdfSaveOptions saveOptions = SaveOptions.CreateSaveOptions(SaveFormat.Pdf) as PdfSaveOptions;

            asposeWordDocument.Save(outputMemoryStream, saveOptions);
            pdfData = outputMemoryStream.ToArray();
      }
}

@Makam

Please note that Aspose.Words mimics the behavior of MS Word. If you convert your HTML to PDF using MS Word, you will get the same output.

We have logged this feature as WORDSNET-21478 in our issue tracking system. You will be notified via this forum thread once there is an update available on it.