The attached document has 5 paragraphs formatted with a (numbered) list style called ‘Foo’.
On the second and fifth paragraph, the list numbering was removed, making them non-list paragraphs.
The list thus looks like this:
When saving a com.aspose.words.Document as PDF (with Document.saveToPdf(String path)), the left indents are completely lost (0) on the paragraphs whose list numbering was removed.
1. First list paragraph
Second list paragraph
2. Third list paragraph
3. Fourth list paragraph
Fifth list paragraph
As our customers use list styles with rather large indents (up to 7cm), the identation differences between the original document and the PDF is clearly visible and very disturbing.
Only the PDF export seems to be affected, when saving as HTML the indents are retained.
The left indents are correctly present in the document object model (paragraph.getParagraphFormat().getLeftIndent() is the same for all 5 paragraphs).
paragraph.getParagraphFormat().getStyle().getListFormat().isListItem() is true for all 5 paragraphs.
paragraph.isListItem() is true for the first, third and fourth paragraph, and false for the second and fifth paragraph.
Is this a known bug, and are any workarounds know to circumvent this problem?
Many thanks in advance,
- Peter