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.

Fri Aug 07, 2015 6:48 am

Hi I'm attempting to convert a word.docx file to pdf using you Spire.Doc product.

I use the following code:
Code: Select all
            var document = new Document();

            document.LoadFromFile(outputFilePath);
            document.SaveToFile(Path.ChangeExtension(outputFilePath, ".pdf"), FileFormat.PDF);


When I run this code on the my word document I get the following error (I can't attach the file because your site says docx is not allowed).
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.System.Collections.IList.get_Item(Int32 index)
at Spire.Doc.Collections.CellCollection.get_Item(Int32 index)
at Spire.Doc.Documents.Paragraph.?.?()
at Spire.Doc.Documents.Paragraph.?..ctor(Paragraph A_0)
at Spire.Doc.Documents.Paragraph.CreateLayoutInfo()
at Spire.Doc.DocumentBase.Spire.Doc.Layout.IDocumentBase.get_LayoutInfo()
at spr?.?()
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0)
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0, spr? A_1, spr? A_2)
at spr?.?()
at spr?.?(IDocument A_0)
at spr?.?(Document A_0)
at Spire.Doc.Document.?(String A_0)
at Spire.Doc.Document.SaveToFile(String fileName, FileFormat fileFormat)
at WordTemplating.Program.ConvertToPdf(String outputFilePath)
at WordTemplating.Program.Run(String[] args)
at WordTemplating.Program.Main(String[] args)

kepboy
 
Posts: 2
Joined: Fri Aug 07, 2015 6:31 am

Fri Aug 07, 2015 7:19 am

Hello,

Thanks for your inquiry.
Please kindly note that firstly you need to compress the file and upload.
Or you can send it to us ( [email protected] ) via email.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Thu Aug 13, 2015 12:38 am

See attached zip file, still broken.

kepboy
 
Posts: 2
Joined: Fri Aug 07, 2015 6:31 am

Thu Aug 13, 2015 1:59 am

Hello,

Thanks for your information.
I have noticed your issue. And I have posted the issue to our dev team. We will inform you when it is fixed. Sorry for the inconvenience.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Mon Aug 24, 2015 7:27 am

Hello,

Sorry to keep you waiting.
The new version of Spire.Doc ( Spire.Doc Pack(hot fix) Version:5.5.71 ) solved your issue has been released. Please download it via link below and have a try.
http://www.e-iceblue.com/Download/download-word-for-net-now.html

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Thu Aug 27, 2015 9:01 am

Hello,

Have you tried the Spire.Doc Pack(hot fix) Version:5.5.71?
Has your issue been resolved?
Thanks for your feedback.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Return to Spire.Doc

cron