//Load an existing PDF document
PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
//To-Do some manipulation
//To-Do some manipulation
//Save the document in file system
loadedDocument.Save("Output.pdf");
//Close the document
loadedDocument.Close(true);|
string filename = @"Reports\Templates\TestReport.pdf";
PdfLoadedDocument pdfDoc = new PdfLoadedDocument(filename);
pdfDoc.Save(filename); // Instead of this
pdfDoc.Save(@"Reports\Output\TestReport.pdf"); // try this |
|
string filename = @"Reports\Templates\TestReport.pdf";
PdfLoadedDocument pdfDoc = new PdfLoadedDocument(filename);
PdfLoadedPage page = pdfDoc.Pages[0] as PdfLoadedPage;
PdfGraphics graphics = page.Graphics;
PdfFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10);
//Candidate Name
graphics.DrawString("First Name".ToString(), font, PdfBrushes.Black, new PointF(385, 140));
//Family Name
graphics.DrawString("Last Name".ToString(), font, PdfBrushes.Black, new PointF(115, 165));
string fileName = @"Reports\Output\TempReport_" + Guid.NewGuid() + ".pdf";
pdfDoc.Save(fileName)
pdfDoc.Close(true);
System.Diagnostics.Process.Start(fileName); |