Hello World
Hello World
Hello World
Hello World
On further investigation this markup also does not work:
Hello World
Hi Brett,
Thanks for your inquiry. I have tested the scenario using latest version of Aspose.Words for .NET 14.10.0 and have not found the shared issue. Please use Aspose.Words for .NET 14.10.0. I have used the following code example to test your scenario. Please check the attached output document.
<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:DoNotOptimizeForBrowser/>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–>
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertHtml(@" Hello World
Hello
World
doc.Save(MyDir + "Out.docx");
<!–[if gte mso 10]>
<![endif]–>Moreover, in version Aspose.Words (14.6.0), we introduced a
new overload method of DocumentBuilder.InsertHtml which allows you to
choose what formatting will be used as a base for inserted HTML
fragments.
builder.ParagraphFormat.LeftIndent = 72;
builder.Font.Name = “Arial”;
builder.Font.Size = 24;
bool useBuilderFormatting = …
builder.InsertHtml(“Text
”, useBuilderFormatting);Thank you for the response Tahir.
Hi Brett,
Thanks for your inquiry. This was an issue in older version of Aspose.Words and have fixed in latest versions. Unfortunately, there is no workaround available for this issue.
We
don’t provide support for older released versions of Aspose.Words.
Please note that we do not provide any fixes or patches for old versions
of Aspose products either. All fixes and new features are always added
into new versions of our products. So, you will have to upgrade if you
need new features or fixes. Please download latest version of Aspose.Words from here:
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/entry585147.aspx
Thank you for your clarification and help.