Ever wanted to convert a ODT (Openoffice Document File) to a PDF without having to start OpenOffice? Here is how.. Command line PDF’s as I like to call it!
OK.. so you have a directory full of ODT files and you want to make one PDF out of them.. Lets get started.
Your going to need a package called “unoconv”. In Ubuntu land this is what you needed to type:
(sudo) apt-get install unoconv
This will install unoconv, but it may not work at this stage. You need to make sure you have installed OpenOffice too.. I was trying this program out on Ubuntu Server (ie no GUI as such). Make sure you install the OpenOffice package and all it’s dependencies.
It’s a really simple application to use..
unoconv -f pdf <input file>.odt
Now you should get a <input file>.pdf in the directory you ran the script.
So now we have a directory full of odt and their pdf verisons… Next step, roll them into one BIG pdf. Here is how:
Your going to need another package called “pdfjam”
(sudo) apt-get install pdfjam
Now to roll the PDF’s together:
pdfjoin file1.pdf file2.pdf file3.pdf file4.pdf file5.pdf –fitpaper false –paper a4paper –outfile bigpdf.pdf
Nice or what? After a few moments you’ll have a file “bigpdf.pdf” with all the little ones inside!
Hope this helps…