When generating the PDF, the numbering of the headings does not match

good day,

I generated a DOCX file using ASPOSE. When I turn it into a PDF, the numbering of the headings does not fit.
If I open the file in MS Word then everything is fine. Could you advise me what is wrong.

TB

@benestom sorry I can’t replicate your problem, I’m using the latest version (v23.2.0) of Aspose.Words package and the following code:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.ListFormat.ApplyNumberDefault();

builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading1;
builder.Writeln("Item 1");
builder.Writeln("Item 2");

builder.ListFormat.ListIndent();

builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading2;
builder.Writeln("Item 2.1");
builder.Writeln("Item 2.2");

builder.ListFormat.ListIndent();

builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading3;
builder.Writeln("Item 2.2.1");
builder.Writeln("Item 2.2.2");

builder.ListFormat.ListOutdent();

builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading2;
builder.Writeln("Item 2.3");

builder.ListFormat.ListOutdent();

builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading1;
builder.Writeln("Item 3");

builder.ListFormat.RemoveNumbers();
doc.Save("C:\\Temp\\output.docx");
doc.Save("C:\\Temp\\output.pdf", SaveFormat.Pdf);

output.zip (32.6 KB)

Ithanks for the reply, but this is a specific problem. I also have the latest version (v23.2.0) of Aspose.Words.
Normally everything is fine, but it doesn’t fit with a particular document. Please look at that document on page 7 after generating the PDF.

Thank you in advance0TSP612_02.docx (5.2 MB)

PDF_Word_diference.jpg (55.1 KB)

@benestom
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25064

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSNET-25064) have been fixed in this Aspose.Words for .NET 23.4 update also available on NuGet.