We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

DocumentBuilder.InsertHTML ignores newlines

Unlike most browsers, the InsertHTML method of DocumentBuilder collapses new lines (e.g. \r\n ) to a single space. I had expected it to respect them.


Is this intended behaviour or is it a bug?

Hello

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your request. “\r” and “\n” it is not HTML special characters. For example you can use the following HTML tag to break line

<br /> instead of “\r\n”.

In case of using “\r” and “\n” you should use DocumentBuilder.Write method.

Best regards,

Thanks Andrey,


The use case for us is sending html from the browser to the server for printing, so we can manually replace \r\n with
tags.

Will