Replace PDF Pages
-
Hello, I'm trying to do a program in C # to replace pages in a PDF file to another! I can get a page like this: PdfReader reader = new PdfReader (PdfFilePath); iTextSharp.text.pdf.PdfImportedPage page = pdfCpy.GetImportedPage (reader, pageNumber); pdfCpy.AddPage (page); How to replace such page by page 15 to page 15 of another PDF file? Someone can help me? Please! Sincerely, Killzone DeathMan
-
Hello, I'm trying to do a program in C # to replace pages in a PDF file to another! I can get a page like this: PdfReader reader = new PdfReader (PdfFilePath); iTextSharp.text.pdf.PdfImportedPage page = pdfCpy.GetImportedPage (reader, pageNumber); pdfCpy.AddPage (page); How to replace such page by page 15 to page 15 of another PDF file? Someone can help me? Please! Sincerely, Killzone DeathMan
This may be stating the ****ding obvious but:
- Open pdf file1 and file2 for input.
- Open pdf file3 for output.
- Read pages 1 to 14 from file1 and write to file3.
- Read page 15 from file2 and write to file3.
- Read remaining pages from file1 and write to file3
- Close all files.
file3 now contains a copy of file1 with page 15 changed.
Programming is work, it isn't finger painting. Luc Pattyn
-
This may be stating the ****ding obvious but:
- Open pdf file1 and file2 for input.
- Open pdf file3 for output.
- Read pages 1 to 14 from file1 and write to file3.
- Read page 15 from file2 and write to file3.
- Read remaining pages from file1 and write to file3
- Close all files.
file3 now contains a copy of file1 with page 15 changed.
Programming is work, it isn't finger painting. Luc Pattyn
Thanks for the algorithm! I will try!