<html>
<head>
<style>
.hide {
display: none;
}
</style>
</head>
<body>
<p class="hide">This should be hidden</p>
<p>This should be visible</p>
</body>
</html>
However, it appears that the display: none rule is not being respected. In the generated Word document, the text inside the hidden paragraph is still visible.
It seems that the issue you’re experiencing with the display: none rule not being respected during the conversion to a Word document may be related to how Aspose.Words handles hidden content.
In some cases, content styled with display: none in HTML is correctly marked as hidden in the generated Word document. However, if the “Show paragraph marks and other hidden formatting symbols” option is enabled in Word, you might still see the hidden content. To verify that the content is indeed hidden, you can disable this option in Word (using Ctrl + *).
If you are still seeing the hidden content despite this, it may be worth checking the version of Aspose.Words you are using, as there could be updates or fixes related to HTML rendering and hidden elements.
If you continue to face issues, consider reaching out to the Aspose support team for further assistance.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.