Hello,

I try to add a page in the second position it's the copyright page,

Well, I do  first:

The creation of my page copyright and I close the document, after that, I
read the pdf the I want add the copyright.

But in the end the page added don't have the same size that the others in
pdf, it's bigger.

I copy like that:

    public static void main(String[] args)
        throws IOException, DocumentException, SQLException {
        // using previous examples to create PDFs
        MovieLinks1.main(args);
        MovieHistory.main(args);
        String[] files = {
"results/part2/chapter06/copyRight.pdf","/tmp/pdfWithXampMetadataTEST_PDF_ALFRESC_O39.pdf"};
        // step 1
        Document document = new Document();
        // step 2
        PdfCopy copy = new PdfCopy(document, new FileOutputStream(RESULT));
        // step 3
        document.open();
        // step 4
        PdfReader reader;
        PdfReader reader1 = new
PdfReader("results/part2/chapter06/copyRight.pdf");
        int n;
        // loop over the documents you want to concatenate
             reader = new
PdfReader("/tmp/pdfWithXampMetadataTEST_PDF_ALFRESC_O39.pdf");
            // loop over the pages in that document
            n = reader.getNumberOfPages();
            for (int page = 0; page < n; ) {
                copy.addPage(copy.getImportedPage(reader, ++page));
                if(page == 1)
                    copy.addPage(copy.getImportedPage(reader1, 1));
            }
            copy.freeReader(reader);
            reader.close();
        // step 5
        document.close();
    }
}

Create the page copyRight.pdf with the same size like
pdfWithXampMetadataTEST_PDF_ALFRESC_O39.pdf but how?


Thanks in advance for your help,

best regards,
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to