I don’t know why you set the properties of heading. The header should be aligned to left by default. Please refer to Add Header and Footer to PDF|Aspose.PDF for .NET. Please elaborate your problem or provide a example if you still can’t solve the problem.
Yes a space is reserved between the label and the text. If you set the label width to 0, Aspose.Pdf will enlarge this value to make sure the label can be displayed and there is a blank. Do you need to remove the blank between the label and text?
Yes, it would be good to have the headings line up with the rest of the document.
On a seperate issue how do I get page numbers into a footer. Is there a current page number variable or a replaceable symbol ?
Is there a list of replaceable symbols?
Also I am generating the sections dynamically with the same code and headers and footers appear fine apart from the first page (after the TOC). Any ideas why that would be?
Making heading lines up with the rest of the document is not supported directly. But you can try setting the labelwidth to a proper value (not 0 but something like 9.8, just equals the width of the length of the text in the label) Which will help you to get the similar effect.
About you last question, you need the TOC page have the same header and footer with the subsequent pages, right? This is not supported but I think we should add support for it soon.
It would be nice just to set the header and footers for a document and not have to set it for each section. The problem I am having is not to do with the TOC. I am using the same code to dynamically generate each section in a document, but the first page of sections (ie after the TOC) does not display the header and footer but all the other pages are fine (ie it looks like IsSubsequentPagesOnly has been set, but I have not set IsSubsequentPagesOnly/IsFirstPageOnly)
I tried setting IsFirstPageOnly on the header but the result is the same.
If you just want the first page don't display header, you need not use so many section. You can use just one section and set the header for subsequent pages only.
If you still want to use many sections, the header for the first section should be different from the subsequent sections. The header for subsequent sections should be set normally but the header for the first section shuold be set with IsSubsequentPagesOnly = "true".