I'm looking for a simple (free) way to convert an arbitrary document to a PDF from within a program. There are any number of free PDF printers, but I need to be able to call the conversion within a program without human intervention. The program is being developed in Java, but will run exclusively in a Windows environment so calling an exe seems like a good solution if such a conversion program exists.
I have had some success with JodConverter, which is a Java-based wrapper around the OpenOffice.org API. Basically, you can run OpenOffice as a server and automate the action of opening a document in OpenOffice (which supports many many types) and saving it as PDF. JodConverter makes that a lot easier and has built-in support for running as a web service if you're interested in that.
Downsides: 1) Like OpenOffice itself, the conversion for certain complicated proprietary documents is not perfect; some of your Word documents may not look exactly identical as PDFs. 2) OpenOffice as a server is not entirely stable; if you hit it with a bunch of requests it will crash. One (somewhat expensive -- I think a few thousand dollars US) alternative is Sun's StarOffice Server, which does exactly the same thing as JodConverter (wrap OpenOffice) but adds pooling of OpenOffice instances and other stability support.
The most accurate PDF conversion tools are made by Adobe (and they do have server-based converters with API support), but they are very expensive - tens of thousands of dollars US.
simple... free... pdf... arbitrary input... At least the requirements are easy and reasonable.
Seriously, those requirements just aren't going to be met. If you are willing to pay money for a library that does some of this, you can check out Amyuni - It's a great library, but the type of stuff you are asking for is squarely in native win32 land - not something that's going to happen in Java. And even with that in place, it's not going to be simple.
I suppose you could do something with Ghostscript as well (many of the free PDF converters use it). But even then, you still have to deal with the conversion from arbitrary input issue.
There are other libraries available that can display lots of different file formats (even without the native application available) - perhaps something like that would work. Here's one (owned by Oracle now, so you know it's gotta be good ;-) : Outside In.
(BTW - iText is most definitely not going to do what you are asking about. I love iText, I use iText - heck, I'm a developer for part of iText - but it's most definitely not a PDF print driver, which is more in line with what you are going for).