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.

Wed Oct 22, 2014 9:50 am

I am looking for code sample in c# to convert a aspx page content to word on a button click event. Kindly please help me.

spire20
 
Posts: 3
Joined: Tue Oct 21, 2014 4:57 pm

Thu Oct 23, 2014 2:45 am

Dear spire20,

Thanks for your requiry.

For your requirement, please refer to the attachment.
Note: I remove the reference of Spire.Doc in project so that I can upload it, please reference Spire.Doc before building.

Best Regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Thu Oct 23, 2014 6:42 am

Thanks for your support and reply.

I have downloaded the Spire.doc
Free Spire.Doc for .NET Version:5.2
and referenced the dll in the Project. I am using version 4.0. I am getting an error as follows.

using Spire.Doc;
usng Spire.Doc.Documents;

Error on the line below:
document.LoadHTML(reader, baseHref, Spire.Doc.Documents.XHTMLValidationType.None);

Error: Spire.Doc.Document does not contain a definition for 'LoadHTML' and no extension method 'LoadHTML' accepting a first argument of type 'Spire.Doc.Document' could be found (are you missing a using directive or assembly reference)

Please reply.

spire20
 
Posts: 3
Joined: Tue Oct 21, 2014 4:57 pm

Thu Oct 23, 2014 7:09 am

Dear spire20,

Please download the Spire.Doc Pack(hot fix) Version:5.2.48 to test via link below:
http://www.e-iceblue.com/downloads/hot_ ... 5.2.48.zip

Best Regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Thu Oct 23, 2014 9:51 am

The type initializer for spr threw an exception is the error that I got on the line
document.LoadHTML(reader, baseHref, Spire.Doc.Documents.XHTMLValidationType.None);

I am refering to spire.doc.dll and spire.license.dll in the Project reference. I have applied the hotfix and using the spire.doc.dll from hotfix folder.

Please reply.

spire20
 
Posts: 3
Joined: Tue Oct 21, 2014 4:57 pm

Fri Oct 24, 2014 1:21 am

Dear spire20,

Please make sure that the project's target framework is the same as the dll's.
Also, you can clean the project and rebuild it.

Best Regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Mon Oct 27, 2014 6:06 am

Dear spire20,

Have you tried the Spire.Doc Pack(hot fix) Version:5.2.48 to resolve the problem?
Please feel free to contact us if you have any problem.

Best Regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.Doc

cron