Mingzuo Shen wrote:
> The AddWatermarkPageNumbersiText example
> works only for certain PDF files?

I works for all PDF files in the sense that it
adds new content under the existing content.
That doesn't necessarily mean yo will actually
see this content. For instance:
- the new content is added outside the page area
   that is visible in your PDF viewer
- the new content is hidden by some opaque objects
   (a rectangle filled with color, an image,...)

> I tried on several PDF files,
> one downloaded from Adobe,
> one generated by myself using Distiller,
> and one generated by myself using Bullzip
> PDF print driver.
> The "over" part works fine.
> But watermark graphic that is put
> on the "under" content does not show.
> It is obscured by the original content.

That's perfectly possible.
What else did you expect?

> When the new PDF is opened
> in Acrobat Reader, I can select the image
> by clicking at the right area,
> even though I do not see it.

That's proof that iText actually added the new content.

> The image then can be copied to clipboard
> and into a graphic program and indeed
> that is the watermark image.

Yep. In other words: this is not a bug.

> AddWatermarkPageNumbersiText works fine
> on the PDF generated by iText itself.
> 
> Searched iText archive a bit
> and did not find a similar problem so far.

This has been discussed before.
One of the best answers was to add the image
on top of the existing content, but use transparency
to make the image transparent (so that the content
underneath the image is still visible).

This is explained in chapter 11 of the book.
br,
Bruno

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to