All went well until the client said he wants the first page of the pdf to be the cover. This means the first page should have no margins, and the next ones should. My base class that I inherited all my export files from had in it's constructor this:
public ExportPDF()
{
this.document = new Document();
this.document.DefaultPageSetup.Orientation = Orientation.Portrait;
this.document.Info.Author = GlobalBL.AdministratorFullName;
this.document.FootnoteLocation = FootnoteLocation.BottomOfPage;
this.document.FootnoteNumberStyle = FootnoteNumberStyle.Arabic;
this.document.FootnoteStartingNumber = 1;
this.document.DefaultPageSetup.PageFormat = PageFormat.A4;
this.document.DefaultPageSetup.TopMargin = "1cm";
this.document.DefaultPageSetup.BottomMargin = "2cm";
this.document.DefaultPageSetup.LeftMargin = "1cm";
this.document.DefaultPageSetup.RightMargin = "1cm";
this.document.DefaultPageSetup.HeaderDistance = "0cm";
this.document.DefaultPageSetup.FooterDistance = "0cm";
this.document.UseCmykColor = false;
DefineStyles();
this.section = this.document.AddSection();
}
I have noticed that even if I comment the footnote part, nothing changes, I still get the foot note numbering. So in this format, all the pages would get the margins. If I take them out, the cover looks perfect, but the rest of the pages don't. But there I guess at every exported item I could do an indent or something, don't know yet, maybe someone could have an idea on that too...But could one get rid of the page numberings, and more important, how can I skip the first page(the cover) from being numbered? Really hope someone could help. Thanks