Integrating openoffice commandline for pdf conversion

I’m needing to create thumbnails of uploaded Office documents. I’ve read that openoffice is the way to go as an intermediary for this (already using ImageMagick for thumbnails). Has anyone seen a written tutorial on how to get this set up? Has anyone set this up themselves?

Thanks for any help.