iText 5

Adding a cover page to an existing PDF

These examples were written in answer to the question Click How to add a cover page to an existing PDF document? | iText 5 PDF Development Guide


addcover1

##GITHUB:https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/merge/AddCover1.java##




addcover2

##GITHUB:https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/merge/AddCover2.java##


Resources

https://github.com/itext/i5js-sandbox/blob/master/resources/pdfs/hero.pdf
https://github.com/itext/i5js-sandbox/blob/master/resources/pdfs/pages.pdf

Results

https://github.com/itext/i5js-sandbox/blob/master/cmpfiles/merge/cmp_pages_with_cover.pdf
https://github.com/itext/i5js-sandbox/blob/master/cmpfiles/merge/cmp_cover_with_pages.pdf