What about the direct content?

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Gerald Fehringer [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, March 26, 2003 13:51
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] enhancement for PdfDocument.addWatermark()
> ?
> 
> Hello iText users!
>  
> I have modified the PdfDocument.addWatermark() a little bit. Normally one
> would need to set the watermark before opening the document to have it
> shown on the first page also. Since in my application I'm not able to
> provide the watermark before the document is opened I have adjusted the
> addWatermark() method in a way that the watermark will be added to the
> page immediately if the page is still empty.
>  
> Here is the code, hope it can find its way into the next release:
>  
> /**
>  * Sets the <CODE>Watermark</CODE>.
>  *
>  * @param watermark the watermark to add
>  * @return <CODE>true</CODE> if the element was added, <CODE>false</CODE>
> if not.
>  */
>  
> public boolean add(Watermark watermark)
> {
>  if (writer != null && writer.isPaused())
>  {
>   return false;
>  }
>  this.watermark = watermark;
>  try
>  {
>   if (pageEmpty)
>   {
>    if (watermark != null)
>    {
>     float mt[] = watermark.matrix();
>     addImage(graphics, watermark, mt[0], mt[1], mt[2], mt[3],
> watermark.offsetX() - mt[4], watermark.offsetY() - mt[5]);
>    }
>   }
>  }
>  catch (DocumentException e)
>  {
>   e.printStackTrace();
>  }
>  return true;
> }
>  
> Kind regards,
> Gerald.


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to