pdf-annotations

Copy PDF with Annotations using iText

北慕城南 提交于 2019-11-30 09:23:24
问题 We need to import existing multiple PDFs into a single new PDF. Part of codes work similar to the sample codes in section 6.2.1 of iText in Action 2nd edition : Document document = new Document(); PdfWriter writer = PdfWriter.getInstance( document, new FileOutputStream(RESULT)); document.open(); PdfPTable table = new PdfPTable(2); PdfReader reader = new PdfReader(MovieTemplates.RESULT); int n = reader.getNumberOfPages(); PdfImportedPage page; for (int i = 1; i <= n; i++) { page = writer