wely ylew wrote:
> Dear all,
>  
> Is there a way to strike down some text on a picture?
>  
> I tried like this:
>  
> 
> iTextSharp.text.Jpeg pic = new Jpeg(Image.GetInstance(@"C:\sample.jpg"));
> 
> doc.Add(pic);
> 
> doc.Add(new Paragraph("some simple text"));
> 
>  
> But it results the text "some simple text" come on other page after the 
> "sample.jpg" picture.
> What I expected is "on top of the picture, *just like background*" not 
> "after the picture".
>  
> Is there away to solve it?

I'd create a PdfTemplate object with the same dimensions of the image. 
Then I'd add the image to this object and add text with the methods that 
are available in PdfContentByte (addImage(), showTextAligned(), etc...)
Finally, you can wrap this PdfTemplate in another Image object, and 
treat it as any other "normal" image.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to