Hi,
We have an issue with the external stylesheet(.dotx) in doc format output. In doc format output I am getting the unexpected indent.But the output is coming perfectly in .docx format. I am using Aspose words 17.7.
Document doc = new Document("D:\\StyleSheetForRPE.dotx");
DocumentBuilder docBuilder = new DocumentBuilder(doc);
String text = "Hello";
docBuilder.insertHtml(text);
docBuilder.getParagraphFormat().setStyleName("Heading 1");
doc.updateFields();
String baseFolder = System.getProperty("java.io.tmpdir");
String unique = UUID.randomUUID().toString().replaceAll(" ", "_");
String docpath = baseFolder + "Aspose-" + unique + "_" + BuildVersionInfo.getVersion();
doc.save(docpath + ".doc");
doc.save(docpath + ".docx");
I have attached .doc , .docx , outputDifference.png and dotx file.
Check Style Heading 1 in both outputs.
For docx - Hedaing 1: LEFT : 0
For Doc - Heading 1: left indent is 0.03 because of that it is giving indent.
LEFT : 0.03
Files.zip (50.0 KB)