-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chris Liles wrote:
>
> So I have hacked up the servlet example from the website to get my pdf
> looking how I want it to. I would like to add a watermark. The example for
> the watermarking uses a PdfContentByte object. From looking at the other
> examples, to get a PdfContentByte I need to "writer.getDirectContent()" with
> writer being a PdfWriter object.
> From the servlet example I don't have a PdfWriter object, I just call
> PdfWriter.getInstance(document, baos)
>
> I can't figure out how to adapt the code to get a PdfContentByte object in my
> servlet.
>
> Can anyone tell me how to get a PdfContentByte object from just having
> PdfWriter.getInstance(document, baos)??
Just replace the line above from the servlet example with:
PdfWriter writer = PdfWriter.getInstance(document, baos);
and then use "writer.getDirectContent()" to insert the watermark based
on the watermark example code.
Xavier
- --
Xavier Le Vourch
Brittany Software, Inc.
<[EMAIL PROTECTED]>
PGP Key: http://brittanysoftware.com/gpg_key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDaAprA3JYBYlsWUcRAiHtAJ40BgrM30j950vEW+m4W+It7HeeUACeOR26
dNAFCst6p6P0CgIwRsVtBgA=
=KDDZ
-----END PGP SIGNATURE-----
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions