user1828643
user1828643

Reputation: 21

MVC3 using Open Office to convert Docx to PDF Issue

Newbie to site and MVC/.net web development.

I have searched hi and low and although there are some threads about this issue, I cannot seem to get a solution/direct answer ... hopefully someone here can assist.

I am using VS2010/MVC3/C#/.Net4/IIS7 to develop an internet app. making use of Open Office 3.4.1 to create PDF's from Docx documents.

I used this approach: http://tinyway.wordpress.com/2011/03/30/how-to-convert-office-documents-to-pdf-using-open-office-in-c/

All works fine on my local development machine, however as soon as I publish on the test server ... the bootstrap call (line 10) does not return (simply hangs for lack of better description)

Hopefully someone here can help.

Thanks, Eugene

Upvotes: 1

Views: 978

Answers (1)

LeftyX
LeftyX

Reputation: 35597

I guess you have installed Open Office on your development machine. You have to do the same on your web server making sure you're using the same Open Office version.

Your application must reference these assemblies:

  1. cli_basetypes.dll
  2. cli_cppuhelper.dll
  3. cli_oootypes.dll
  4. cli_ure.dll
  5. cli_uretypes.dll

and they all have to be set "Copy Local" to false.
You won't deploy these dlls cause they're going to be loaded from the GAC.

If your IIS is running on a x64 OS you might need to: "Enable 32-Bit Applications" = True

This article might help you.
If you want to dig deeper.

Upvotes: 1

Related Questions