Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert Word and Excel documents to PDF programmatically?

We are developing a little application that given a directory with PDF files creates a unique PDF file containing all the PDF files in the directory. This is a simple task using iTextSharp. The problem appears if in the directory exist some files like Word documents, or Excel documents.

My question is, is there a way to convert word, excel documents into PDF programmatically? And even better, is this possible without having the office suite installed on the computer running the application?

like image 449
Doliveras Avatar asked Sep 02 '08 08:09

Doliveras


People also ask

How do I create a PDF from Word and Excel?

Open your Word, Excel, or PowerPoint document, if it's not already open. Then click the Acrobat tab. In the Acrobat task ribbon, click Create PDF. If you're converting an Excel document, a second dialog box will appear with further options.


1 Answers

Office 2007 allows for this. I have found PDFCreator to be good, the VBA is included in sample files, and have heard that CutePDF is also good. PDFCreator and CutePDF are free.

To work without Office, you would need viewers, as far as I know: http://www.microsoft.com/downloads/details.aspx?FamilyID=c8378bf4-996c-4569-b547-75edbd03aaf0&displaylang=EN

http://www.microsoft.com/downloads/details.aspx?familyid=95E24C87-8732-48D5-8689-AB826E7B8FDF&displaylang=en

like image 144
Fionnuala Avatar answered Oct 23 '22 03:10

Fionnuala