Thanks for you speedy reply!
I have now extended the handler class:
if (name.Equals("watermark"))
{
Image pic = Image.GetInstance(attributes["filename"]);
Watermark nWatermark = new Watermark( pic, 200, 420);
document.Add(nWatermark);
}
This works okay on all pages except the first page. In XML/XLS definition the start of the file looks like:
<?xml version="1.0" encoding="unicode"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" version="1.1" omit-xml-declaration="no" encoding="unicode" />
<xsl:template match="/">
<ITEXT pagesize="A4" orientation="portrait">
<watermark filename="C:\imagefilename.gif" />
<newpage />
...
regards
Ludvig
Bruno Lowagie <[EMAIL PROTECTED]> wrote:
Bruno Lowagie <[EMAIL PROTECTED]> wrote:
tludde at yahoo.com wrote:
> Is it possible to add a watermark to a PDF using XMLParser (or add a
> image as a background to a table)?
The best way to add watermarks is by using page events
(added to the PdfWriter). If you want to let the XMLParser
add the page event, you need to adapt the Handler class.
br,
Bruno
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Get your email and more, right on the new Yahoo.com
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
