Hello,
I have used PdfLoadedDocument and document.Pages.Insert to add a new page to the beginning of my document. I would like to add text to the first page (the one created with the Pages.Insert()) but it doesnt seem like its possible. Im getting a NullException when i try this.
//Load the PDF document
PdfLoadedDocument document = new PdfLoadedDocument(dlFile);
//Insert a new page into the document
document.Pages.Insert(0,PdfPageSize.Letter);
//Adding Text to First Page
PdfLoadedPage page = document.Pages[0] as PdfLoadedPage;
PdfGraphics graphics = page.Graphics;
PdfFont graphicFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
graphics.DrawString("Test", graphicFont, PdfBrushes.Black, new PointF(0, 0));
//End Adding text to first page