Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Sun May 31, 2015 6:42 am

Converting Word documents with spire.doc cannot be converted to PDF
Some simple documents can be successful, this document can not

Error:The index and the length must refer to the location within the string.
Parameter name: length


Code: Select all
  Document document = new Document();
            document.LoadFromFile(@"C:\\Users\\tang\\Desktop\\汤立德测试50到题效率2.doc");
            document.SaveToFile("C:\\Users\\tang\\Desktop\\汤立德测试50到题效率2.pdf", Spire.Doc.FileFormat.PDF);
            document.Close();
            System.Diagnostics.Process.Start("C:\\Users\\tang\\Desktop\\汤立德测试50到题效率2.pdf");

1665593517@qq.com
 
Posts: 5
Joined: Fri Mar 20, 2015 5:43 am

Mon Jun 01, 2015 1:40 am

Hello,

Thanks for your inquiry.
I have reproduced your issue and posted it to our dev team. Once it is resolved, we will let you know.

Best Regards,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Wed Jun 24, 2015 3:26 am

Can you help me with this problem?
But I know if the Word file is docx format, it can be converted to PDF.

1665593517@qq.com
 
Posts: 5
Joined: Fri Mar 20, 2015 5:43 am

Wed Jun 24, 2015 7:43 am

Hello,

Sorry for long silence. Our Dev team has fixed the issue of throwing exception, the document currently can be converted to PDF. But some texts on first page were lost. Our Dev team is working on it. We will let you know as soon as there is any update.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Return to Spire.Doc