Hi
Can i check if there's a feature which can replace a page of the PDF from a page of another PDF file?
Thanks.
PdfDocument pdfA = new PdfDocument();
pdfA.LoadFromFile("FileA.pdf");
PdfDocument pdfB = new PdfDocument();
pdfB.LoadFromFile("FileB.pdf");
//Replace the page 2 of File B with page 2 of File A
//1. Remove the page 2 of File B
pdfB.Pages.RemoveAt(1);
//2. Insert a new page after page 1 of File B
PdfPageBase pageB = pdfB.Pages.Insert(1, pdfB.Pages[0].Size);
//3. Get the page 2 of File A
PdfPageBase pageA = pdfA.Pages[1];
//4. Draw template
pageB.Canvas.DrawTemplate(pageA.CreateTemplate(), PointF.Empty);
pdfB.SaveToFile("Result.pdf", FileFormat.PDF);