Esempio n. 1
0
        ////////////////////////////////////////////////////////////////////
        // Add page to document and draw page number
        ////////////////////////////////////////////////////////////////////

        public PdfContents AddPageToDocument
        (
            Int32 PageNo
        )
        {
            // add new page with two contents objects
            Page = new PdfPage(Document);
            Page.AddContents(BaseContents);
            PdfContents Contents = new PdfContents(Page);

            // draw page number right justified
            Contents.SaveGraphicsState();
            //Contents.DrawText(ArialNormal, 10, PageWidth - Margin, PageHeight - 0.75 - ArialNormal.CapHeight(10), TextJustify.Right, String.Format("Page {0}", PageNo));
            Contents.RestoreGraphicsState();
            return(Contents);
        }