Problem Solved!

The issue was really about the RDP Protocol (Remote Desktop). There is
a known bug documented in http://support.microsoft.com/kb/972828.

Here's a description of the RDP Problem:

Files that are copied from a Windows Server 2008-based remote computer to a
Windows XP SP3-based client computer by using the Remote Desktop Connection
6.1 client are corrupted
Consider the following scenario. You have a remote computer that is running
Windows Server 2008 and a client computer that is running Windows XP Service
Pack 3. You use the Remote Desktop Connection 6.1 client to copy a file from
the remote computer to the client computer. After the copy operation is
complete, the size of the copied file is different to the size of the
original file on the remote computer. Additionally, the copied file may be
corrupted.

Maybe it can help others!


Ps. about your question, i use .toArray().

Thanks.



2010/5/10 Paulo Soares <psoa...@glintt.com>

>  Look like a problem with your transfer service. If I delete the extra
> bytes from the corrupt pdf it works correcly. Are you using
> MemoryStream.GetBuffer() instead of MemoryStream.ToArray()? (just guessing)
>
> Paulo
>
> ----- Original Message -----
> *From:* Lucas Matis <lucasma...@gmail.com>
> *To:* itext-questions@lists.sourceforge.net
> *Sent:* Monday, May 10, 2010 12:02 AM
> *Subject:* [iText-questions] Signed PDFs get corrupted when copyed from
> server
>
> hello,
>
> I'm new in the list but we've been using iTextSharp for a while. I
> developed a windows service that batch sign with Timestamp lots of PDFs (hot
> folder like).
> Since last week, all OK. Now I'm experiencing problems runing the service
> in Windows 2008 x64.
>
> Here is the process:
> 1 - User can opt to add an image to the footer and determine where to put
> the Signature Appearance.
> 2 - when the PDF is copyed to Input Folder, an Event (FileSystemWatcher)
> put that file at Queue.
> 3 - One available thread of the service open that PDF, insert the Image and
> SAP
> 4 - the service then sign and put the timestamp at the signature.
> 5 - the service saves that new PDF signed at output folder.
>
> The Problem:
> We are using windows 2008 x64 to get higher performance. The service runs
> OK on this system.
> This week we realized that once we copy  signed pdfs to any desktop (via
> ciffs or RDP) it get corrupted and the signature is marked as invalid.
>
> More info:
> Searching the web and debuging everything we noted this
> 1 - When i sign at desktop and copy to server, the file opens at the
> server. If i copy that file back to desktop, it get corrupted.
> 2 - When i sign at server, it opens ok at server. If i copy to desktop it
> get corrupted.
> 3 - Looking inside de corrupted PDF we can see bytes after the original
> %%EOF. It seems to be some parts of the original file replicated at the
> end...
> 4 - One file signed with the same routine don't get corrupted at transfer.
> I could not realise why...
>
> Follows links to example PDF:
> The pdf signed - http://www.imprensaoficial.com.br/itext/signed.pdf
> The PDF corrupted after transfer -
> http://www.imprensaoficial.com.br/itext/corrupted.pdf
> The original one - http://www.imprensaoficial.com.br/itext/original.pdf
>
> It would be great if someone can give a hit about the cause, i don't know
> where to look anymore.
>
> thanks a lot.
>
> --
> Lucas Matis
> ---------------
> "O segredo da genialidade é carregar o espírito da infância na maturidade."
>
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.itextpdf.com/book/
> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list:
> http://1t3xt.info/tutorials/keywords/
>



-- 
Lucas Matis
---------------
"O segredo da genialidade é carregar o espírito da infância na maturidade."
------------------------------------------------------------------------------

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to