We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Text orientation is changed when updating page numbers

Hi,

we noticed an issue with documents, which has vertical text elements placed in headers/footers. When the documents contains a toc and you try to update page numbers, the vertical text changes to horizontal text:
Before:
image.png (2.0 KB)
After:
image.png (1.7 KB)

Example documents are attached. You can reproduce the issue with the following code:

        static void Main(string[] args)
        {
            var lic = new License();
            lic.SetLicense(@"S:\Aspose.Total.lic");

            var doc = new Document(@"S:\tmp\example.docx");

            // Inhaltsverzeichnis
            foreach (var fs in doc.GetChildNodes(NodeType.FieldStart, true).AsEnumerable().Cast<FieldStart>()
                .Where(fs => fs.FieldType == FieldType.FieldTOC))
                ((FieldToc)fs.GetField()).UpdatePageNumbers();

            doc.Save(@"S:\tmp\out.docx");
        }

When you remove the toc of the document complelty and run it with same code, the issue does not occure any more.

Kind regards and thanks for your help,
Daniel

example.zip (66.7 KB)

@Serraniel I have managed to reproduce the problem and logged it as WORDSNET-22907 in our defect tracking system. We will keep you informed and let you know once it is resolved.

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