close

 

        Document document;
        PdfCopy copy;
        int number_of_pages = pdfReader.getNumberOfPages();
        for (int i = 0; i < number_of_pages;) {
            document = new Document();
            String FileName = "File" + ++i + ".pdf";
            copy = new PdfCopy(document, new FileOutputStream(".\\test\\"+FileName));
            document.open();
            copy.addPage(copy.getImportedPage(pdfReader, i));
            document.close();

        }

 

arrow
arrow
    全站熱搜

    Fisher810228 發表在 痞客邦 留言(0) 人氣()