Ah, you beat me to it!
I just found section 2.2.7 in the iText book, which led me to the fairly
clean code below.
Here was my solution:
try {
// Set up article file name and "merged" name...
String mergeFileName = articleFileName.replaceFirst(".pdf$",
".merged.pdf");
// New attempt...
PdfCopyFields mergedCopy = new PdfCopyFields(new
FileOutputStream(mergeFileName));
mergedCopy.addDocument(new
PdfReader(coverPdfOutputStream.toByteArray()));
mergedCopy.addDocument(new PdfReader(articleFileName));
mergedCopy.close();
Thanks for the response!
Good list.
-Colin
On Thu, May 21, 2009 at 11:15 AM, 1T3XT info <[email protected]> wrote:
> Colin Freas wrote:
> >
> > Ah, that's make sense.
> >
> > So, what is the idiomatic way to copy the annotations along with the
> > content stream?
>
> It depends on your workflow, but my first answer would be:
> use PdfCopy to concatenate the end result.
> --
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
>
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals.
> Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list:
> http://1t3xt.info/tutorials/keywords/
>
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/