thank you bruno,
i'm sorry but i really have a problem ! i dont understund, the watermark
dont appear under PdfPtable, I think that i must use constant
PdfPtable.BASECANVAS  but i dont know how to do this,i see examples on link
you give me but i m newbie in java code :(

 i change my code like this : (I use VB.NET 2005 to do this and itextsharp
version 4.0.7.0)

    Public Overrides Sub onOpenDocument(ByVal writer As PdfWriter, ByVal
document As Document)
        gstate = New PdfGState()
        gstate.FillOpacity = 1.0F
        gstate.StrokeOpacity = 1.0F
        helv = BaseFont.CreateFont("Helvetica", BaseFont.WINANSI, False)
    End Sub

    Public Overrides Sub onstartPage(ByVal writer As PdfWriter, ByVal
document As Document)
        Dim cb As PdfContentByte = writer.DirectContentUnder
        cb.SaveState()
        '--ne pas afficher "version démo" sur la première page
        If (writer.PageNumber() >= 2) Then
            cb.SetGState(gstate)
            cb.SetColorFill(Color.GRAY)
            cb.BeginText()
            cb.SetFontAndSize(helv, 58)
            cb.ShowTextAligned(Element.ALIGN_CENTER, "Version de
démonstration", document.PageSize.Width() / 2, document.PageSize.Height() /
2, 45)
            cb.EndText()
            cb.RestoreState()
        End If
  End Sub

Thank you again bruno !


Bruno Lowagie (iText) wrote:
> 
> morsi wrote:
>> Dim Mywatermark As New
>> Watermark(Image.GetInstance(Config.RepertoireApplication &
>> "RessourcesEtats\demo.png"), 10, 10)
>> _Doc.Add(Mywatermark)
>>   
> Watermark has been removed from iText for quite a while now.
> You must be using an old version of iTextSharp.
>> I didn't find on documentation how to add a watermark UNDER PdfPTable
> See example PageNumbersWatermark here:
> http://itextdocs.lowagie.com/tutorial/directcontent/pageevents/index.php#examples
> Or in the book:
> http://itext.ugent.be/itext-in-action/chapter.php?chapter=14
> http://itext.ugent.be/itext-in-action/examples/chapter14/WatermarkExample.java
> http://itext.ugent.be/itext-in-action/examples/chapter14/results/watermarks.pdf
> Note that you need getDirectContentUnder instead of getDirectContent
> (the former adds stuff under the existing content; the latter above the 
> content).
> 
> br,
> Bruno
> 
>  
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Difference-between-Table-and-PdfPTable-tp14999442p15016027.html
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to