Hi Team,
I have two queries.
- How to set and reset hanging indent property through Aspose word Dot net.
- What Property identify a para with bulletin.
Attached the necessary screenshots and a sample template.
image.png (274.1 KB)
Sample Document: SampleDoc.docx (13.2 KB)
Thanks,
Karthikeyan
@alexey.noskov - I have a concern I am trying to apply two property for a para
- Set Left Indent and
- Set FirstLineIndent
But only one property is getting assigned to the para like the first property is alone getting assigned. Can you please confirm If I need to do anything different here?
@Karthik_Test_account FirstLineIndent
and LeftIndent
of paragraph are different options. Please see the following screenshot:
You can see these options in paragraph properties:
@alexey.noskov - If that’s the case how do I achieve this output with Aspose word. That is having both left indent and Hanging property.
Word Configuration:
image.png (15.5 KB)
Output:
image.png (6.1 KB)
Regards,
Karthikeyan
@Karthik_Test_account You should use code like the following:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Set hanging identation.
builder.ParagraphFormat.FirstLineIndent = -ConvertUtil.MillimeterToPoint(6.3);
// Specisfy left indent
builder.ParagraphFormat.LeftIndent = ConvertUtil.MillimeterToPoint(6.3) - builder.ParagraphFormat.FirstLineIndent;
builder.Write("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eu arcu semper, faucibus ante blandit, consequat tellus. In ac ultricies dolor. Ut est lacus, aliquet nec feugiat vel, commodo non eros. Cras sed euismod risus. Quisque diam leo, sodales elementum augue a, fringilla imperdiet justo. Etiam justo erat, laoreet quis egestas aliquam, mattis feugiat neque. Vestibulum nec suscipit sem, id elementum ex. Suspendisse leo metus, molestie nec ante non, pulvinar sollicitudin lacus. Nam consequat dignissim cursus. Integer tellus nunc, pharetra sed metus ac, blandit feugiat turpis. Fusce maximus tortor id urna tincidunt feugiat.");
doc.Save(@"C:\Temp\out.docx");