Adriano Leite Ribero wrote:
> And found that the file was watermarked with an image, but not the
> file on the browser (which appeared without the image).

If I understand well, using the SAME String on the server,
the file written to the server was OK, but the file sent
to the OutputStream is wrong.

> I saved the file that the browse-embedded Acrobat Reader showed (the
> one without the watermark), and then opened both (this one and the
> properly watermarked one) and found that the internal differences are
> that some characters show like "?" in the not  properly watermarked
> file. For example, the set of characters "hijstuvwxyzƒ„…†‡ˆ‰Š'"" from
> the well watermarked file shows as "hijstuvwxyz??????????" inside the
> bad watermarked file.

That typically what happens when you 'shave off' the higher bit
in a binary file.

> Then, I think it implies it has to be something related to
>           - browser encoding (happens in both Explorer and Firefox), or
>           - ByteArrayOutputStream treatment on the above method
> 
> Do you agree? I feel the answer is very close...

I have seen this happening before, but only in a context where
a very old webserver was used; it treated the binary file as
plain text (throwing away the higher bit of every byte).
A webserver upgrade solved the problem.

br,
Bruno

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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