I am using Aspose to automatically add a Header and Footer to Word documents.
The Footer has some content on the left- and some content on the right hand side.
To position the content on the right side I am using a Tabstop that I have positioned like this:
TabStop tab = new TabStop(builder.PageSetup.PageWidth,TabAlignment.Right,TabLeader.None);
Now I am running into the Problem - that when a Document has multiple sections with different orientations. For example: A Document that hast the first page as portrait and the second page as landscape orientation. The second page TabStop will be at the same absolute (x) Position as the TabStop in Section (Page) 1.
Is it possible to position Tabstops to the right side?
TabStop tab = new TabStop(???,TabAlignment.Right,TabLeader.None);
I found that when I insert a large number like this:
TabStop tab = new TabStop(1000,TabAlignment.Right,TabLeader.None);
I will get the desired outcome, but maybe there is a better way?
You are setting the TabStop correctly. However, you can also achieve your requirement by inserting the table into footer with 100% width that contains two cells and one row. Set the alignment of paragraph as right in second cell of table. Set the table’s border to none. Hope this helps you.
We created the footer with table and attached it with this post for your kind reference. To make table visible, we have not removed its border. ExpectedOutput_A4_Portrait_and_Landscape.zip (21.7 KB)