I'm using Apache PDFBox (http://pdfbox.apache.org/) for creating PDFs out of an arbitrary amount of files, including Images and other PDFs. Now I need to add MS Office Documents (Word, Excel and Outlook MSGs) to the PDF. The files can have nearly every Office Version, so it is not granted that the file is a new office file (e.g. docx) or an old one (e.g. doc).
Is there any way to do this only with free tools? My first idea is to read the contnet of every file with Apache POI (http://poi.apache.org/) and recreate the file as a new PDF page, but this can become very costly, as this PDF creation is used on a server by more than fifty people.
Install open office on you server. and it will convert "docx,doc" document to ".pdf".