Hanging Indents

Microsoft word hanging indents are not preserved by the PDF generation process.

Steps to reproduce:

Simply create a word document in Word 2003, add a paragraph of text and set the paragraph “Special” formatting to “Hanging” and “By” to “0.5”. This will cause the first line to be aligned normally and the subsequent lines of the paragraph to be indented by half an inch. After using the following code to generated the PDF, the indent is not present in the PDF file.

The code used to generated the PDF:

Aspose.Word.License wordLicense = new Aspose.Word.License();
wordLicense.SetLicense(@“c:\Inetpub\wwwroot\V1\Aspose\Aspose.Custom.lic”);

Aspose.Pdf.License pdfLicense = new Aspose.Pdf.License();
pdfLicense.SetLicense(@“c:\Inetpub\wwwroot\V1\Aspose\Aspose.Custom.lic”);

Aspose.Word.Document wordDoc = new Aspose.Word.Document(@“c:\home\HangingIndent.doc”);

System.IO.MemoryStream memStream = new System.IO.MemoryStream();

wordDoc.Save(memStream, SaveFormat.FormatAsposePdf);
memStream.Seek(0, System.IO.SeekOrigin.Begin);

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(memStream);

Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
pdf.IsImagesInXmlDeleteNeeded = true;

pdf.BindXML(xmlDoc, null);
pdf.Save(@“c:\home\HangingIndent.pdf”);

Should point out the versions: Aspose.Word v2.4.0.0, Aspose.Pdf v2.1.11.0. This was also occuring in the previous point releases.

OK… have now updated to Apose.Word v2.4.1.0 and Aspose.Pdf v2.2.0.0, same issue.