Load and Save DOCX = corrupted DOCX file

Technical support for Spire.Doc

Moderator: iceblue support

Load and Save DOCX = corrupted DOCX file

Postby mzahumensky » Wed Mar 07, 2012 9:11 am

Hi
I have problem with new spire.office hotfix (1.6.6)
When I load and save DOCX file, output file is corrupted
In my worstation I am using Windows 7 64 bit, .NET framework 3.5.
Customer have Windows 2008 R2 server 64 bit

All my code is:

Code: Select all
Imports Spire.Doc
Module Module1
    Sub Main()
        Dim doc As New Document()
        doc.LoadFromFile("C:\TEMP\Sample_input.docx", FileFormat.Docx)
        doc.SaveToFile("C:\TEMP\Sample_output.docx", FileFormat.Docx)

    End Sub
End Module


I created sample project including, you can download it from url: http://martin.zahumensky.cz/download/Load_and_save_Word_sample.zip
I cannot upload this file here for size limitation

In previous version 1.6.2 of spire.office it works with no problems

Martin Zahumensky
Last edited by mzahumensky on Tue Mar 13, 2012 5:48 pm, edited 1 time in total.
mzahumensky
 
Posts: 18
Joined: Fri May 20, 2011 11:29 am

Re: Load and Save DOCX = corrupted DOCX file

Postby Suvi.Wu » Thu Mar 08, 2012 3:53 am

Hi Martin Zahumensky,

Thank you for reporting this problem to us.


We are so sorry that we need some more time to fix this problem. At the moment I cannot provide you any reliable estimate regarding this issue. However, you will surely be notified as soon as it is resolved. Sorry for inconvenience.


In case of any ambiguity, please let me know. Have a great day!

BR
Suvi
e-iceblue support
User avatar
Suvi.Wu
 
Posts: 156
Joined: Thu Oct 20, 2011 2:53 am

Re: Load and Save DOCX = corrupted DOCX file

Postby Suvi.Wu » Fri Mar 16, 2012 1:11 am

Hi Martin Zahumensky,

Thanks for your patience and so sorry for the long-time waiting. The issue you reported is already resolved in the new Spire.Office version. Please download it(Version 2.0) here http://www.e-iceblue.com/Download/download-office-for-net-now/spire-office-v20.html.

Please feel free to contact us if you have any questions and requests.

Have a nice day.

BR
Suvi
e-iceblue support
User avatar
Suvi.Wu
 
Posts: 156
Joined: Thu Oct 20, 2011 2:53 am

Re: Load and Save DOCX = corrupted DOCX file

Postby mzahumensky » Thu Apr 12, 2012 10:36 am

Hi Suvi
in version spire.office 2.1 there is no progress, problem still occurs ...
I cannot use 2.0 for other problem in spire.xls
Martin
mzahumensky
 
Posts: 18
Joined: Fri May 20, 2011 11:29 am

Re: Load and Save DOCX = corrupted DOCX file

Postby Suvi.Wu » Fri Apr 13, 2012 3:41 am

Hi Martin,

Thanks for your feedback and sorry for this inconvenience caused by us.

We loaded and saved the docx document Sample_input.docx you sent earlier using Windows 7 64 bit. The output docx file is the same as the input file and no damage. I attached the output file, please have a look. Could you please tell us more information such as which target framework you used(2.0, 3.5, 4.0 or silverlights), your OS environment to help us reproduce the issue? Thanks in advance.

As you cannot use 2.0 for other problem in spire.xls, would you please tell us more about the other problem, we will do anything we can figure it.

Note: Because docx file can not be attached, so I changed the file extension as zip. Please change .zip to .docx after downloading this file.

Have a nice day.
BR
Suvi
e-iceblue support
You do not have the required permissions to view the files attached to this post.
User avatar
Suvi.Wu
 
Posts: 156
Joined: Thu Oct 20, 2011 2:53 am

Re: Load and Save DOCX = corrupted DOCX file

Postby mzahumensky » Fri Jan 11, 2013 7:06 pm

Sorry for the long pause, but downgraded to version 1.6.2 and have not upgraded later. But now we need to move to a newer version.

In Spire.Office 2.4.4 the problem still persists.

Default, we use Visual Basic and. NET Framework 3.5, but I also tried 4.0 and there is a mistake as well. Trying to compare binary files created and have many differences. Attached is my bad sample_output.docx and functional output64.docx

Martin
You do not have the required permissions to view the files attached to this post.
mzahumensky
 
Posts: 18
Joined: Fri May 20, 2011 11:29 am

Re: Load and Save DOCX = corrupted DOCX file

Postby amy.zhao » Mon Jan 14, 2013 7:11 am

Hello Martin,

Thank you for your feedback.
We are sorry for the delay response for the weekends here.
We think that the problem may be caused by the decimal separator of your local culture. We provide you a solution to solve it. Please try the code below on your side. If you still have the problem, please tell us.
Code: Select all
Dim document As New Document()
document.LoadFromFile("Sample_input.docx", FileFormat.Docx)

Dim cc As CultureInfo = Thread.CurrentThread.CurrentCulture
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture

document.SaveToFile("Sample_output.docx", FileFormat.Docx)

Thread.CurrentThread.CurrentCulture = cc


Best regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2251
Joined: Wed Jun 27, 2012 8:50 am

Re: Load and Save DOCX = corrupted DOCX file

Postby mzahumensky » Mon Jan 14, 2013 8:55 am

Hi Amy
You're right, my problem is solved!
Thank you for the quick reply
Martin
mzahumensky
 
Posts: 18
Joined: Fri May 20, 2011 11:29 am

Re: Load and Save DOCX = corrupted DOCX file

Postby amy.zhao » Mon Jan 14, 2013 10:10 am

Hello Martin,

You are welcome. :P
If you encounter any problem, please feel free to contact us.

Best regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2251
Joined: Wed Jun 27, 2012 8:50 am


Return to Spire.Doc

Who is online

Users browsing this forum: No registered users and 1 guest