You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using latest stable version of the library (2016.0.0).
When I use SftpClient.OpenWrite() method to create a file on SFTP server, I get an SftpFileStream where writing to.
When I write into this stream data from a valid PDF file, I get a "valid" PDF file on SFTP server. When I say "valid" it is not really true. PDF file has same size as original file and can be opened. But, in fact, the PDF file is not valid because images inside the document have been corrupted while text content is still correct.
Partial screenshot of original generated PDF :
Partial screenshot of corrupted copied PDF :
Here is a comparaison of file content :
It looks like beginning of PDF is written again in destination file. It looks like a buffer problem.
Problem is solved when setting a buffer size (ex: 1024) to the stream's CopyTo() method.
The text was updated successfully, but these errors were encountered:
Do you know where a simple example of using this library might be found? I am new to this library and am not finding any documentation to tell me how to use it. Thanks!
Hi !
I am using latest stable version of the library (2016.0.0).
When I use SftpClient.OpenWrite() method to create a file on SFTP server, I get an SftpFileStream where writing to.
When I write into this stream data from a valid PDF file, I get a "valid" PDF file on SFTP server. When I say "valid" it is not really true. PDF file has same size as original file and can be opened. But, in fact, the PDF file is not valid because images inside the document have been corrupted while text content is still correct.
Partial screenshot of original generated PDF :

Partial screenshot of corrupted copied PDF :

Here is a comparaison of file content :

It looks like beginning of PDF is written again in destination file. It looks like a buffer problem.
Problem is solved when setting a buffer size (ex: 1024) to the stream's CopyTo() method.
The text was updated successfully, but these errors were encountered: