We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error Converting Word document to Aspose PDF

Hello,

I am trying to convert a word document (attached) to PDF using your trial library code. Most word documents convert fine, but this one does not convert fine.

I have attached the code I am using to do this and the image that is failing. The exception message is: "Unable to cast object of type 'Aspose.Words.Drawing.GroupShape' to type 'Aspose.Words.Paragraph'."

Can you please help me with this issue. We have been really impressed with your software and will be using it in a very large environment converting millions of government records.

Thanks!

Dan

CODE:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using Aspose.Pdf;

using Aspose.Words;

namespace Word2Pdf

{

public class Program

{

static void Main(string[] args)

{

Document d = new Document(args[0]);

d.Save(args[1], SaveFormat.AsposePdf);

Pdf p = new Aspose.Pdf.Pdf();

p.BindXML(args[1], null);

p.Save(args[1]);

}

}

}

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. I managed to reproduce this problem and created new issue #6135 in our defect database. I will notify you as soon as it is fixed.

Best regards.

Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I found the reason and fixed #6135 in the current codebase. The correction will be available with the next hotfix in a few weeks. But after conversion I found some differences with the source document. If you’d like to consider them please provide me an e-mail to send materials back privately.

Regards,

The issues you have found earlier (filed as 6135) have been fixed in this update.