Daniel Brownell wrote:
> However, when I change either version to output to a 
> ByteArrayOutputStream and flush it to the ServletOutputStream, it does 
> not show the header/footer/watermark.
> 
> Why would this occur?

You're not giving us much information.
I can only GUESS you have something like this:

Document document = new Document();
PdfWriter writer1 = PdfWriter.getInstance(document, new 
FileOutputStream("my.pdf"));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PdfWriter writer2 = PdfWriter.getInstance(document, baos);
writer1.setPageEvent(new MyCustomEvent());
document.open();
// do stuff
document.close();

If MyCustomEvent is responsible for adding the
header/footer/watermark, it's pretty evident why
these objects are added when writing to the file,
but not when writing to the baos:

you have added the event to writer1, but forgot
to add it to writer2.

Of course this is just a guess; did I win the quiz? ;-)
br,
Bruno

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to