Reputation: 718
Is there any command line app in Ubuntu that can convert Office documents to PDF, like convert Excel (xls,xlsx) and Word(doc, docx) to pdf in Ubuntu. I cannot used any Office suite, like Open Office.
I know that there are Java projects that can communicate with OpenOffice to use its functionality to convert documents to PDF, but not going in direction.
But if the OpenOffice people or LibreOffice people have created a stand-alone command-line app with this capability to covert documents to PDF, I would like that very much.
Upvotes: 3
Views: 4754
Reputation: 145
Step - 1 Install Libreoffice.if it is not install in your system or server.
do follow:
libreoffice --headless --convert-to pdf your_file_path --outdir upload_directory
Here,
your_file_path : complete your file path like /var/www/mydocument.docx
upload_directory : complete directory like /var/www/
Upvotes: 5
Reputation: 1961
1.Download CutePDF
writer
then
sudo apt-get install cups-pdf
2.Set the writer as your default printer.
3.Place all your .doc
files in the same folder
Then run:
oowriter -pt pdf your_word_file.doc
you'll find your .pdf file in ~/PDF.
Upvotes: 1