Hi, am trying to for file uploading of doc, docx type. When I uploaded the file there is no space at the top of the page but when I download the file it makes an extra space at the top of the page.

Is there any solution, suggestion or idea for this problem.

Thank You.

You could use the TrimStart method to adjust the first line of your file.

Depending on how the file is written and formatted, the "extra space" might not necessarily be at the start of the file but at the end for instance.

So, the way that the file is being streamed/read/written is needed :)