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.
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/
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.
Related
I need to convert xlsx into csv file using shell script. I am using RHEL 7.2 linux version. Is there any option to convert xlsx into csv file? please suggest me. Thanks in advance
sudo pip install xlsx2csv
You can refer to
https://github.com/dilshod/xlsx2csv
I've had good experiences with a python converter called (what a surprise!) xlsx2csv.
There shouldn't be any problem installing it on RHEL 7.2.
Problem: When I try to convert xlsx document to PDF, LibreOffice ignores my fonts. It sets "LiberationSerif" for all text. I tried to use "Arial", "Times New Roman" and it did not work.
Evironment: Debian 7x64, LibreOffice 5.2.3.3 installed manually from LibreOffice site. The version availeble in aptitude is outdated.
This is how I try to launch it:
sh /opt/libreoffice5.2/program/soffice --headless --infilter="Microsoft Excel 2007/2010 XML" --convert-to pdf:calc_pdf_Export --outdir /path-to-export-pdf /path-to-input-file/file.xlsx
Additional information: LibreOffice didn't work for me until I created empty ".openoffice.org" folder in my users' home dir. I did research before I post a question here. There are no similar settings in LibreOffice API.
This answer was really close, but I'm not too good in C to learn source code of LibreOffice
http://nabble.documentfoundation.org/Command-line-PDF-export-options-quot-soffice-convert-to-pdf-quot-td4158804.html
I've found #KurtPfeifle answers exreemly helpful, but I cannot thank him as long as I'm newbie here.
Command `libreoffice --headless --convert-to pdf test.docx --outdir /pdf` is not working
I hope Kurt Pfeifle will read this question, because I'm sure he knows the answer :)
I've found the solution. For some reason I expected Arai and Times New Roman to be presented on our server. To get them we had to install ttf-mscorefonts-installer from contrib source of debian.
I am trying to convert a .docx file to PDF using LibreOffice 4.3 on RHEL 6.5 (corporate server).
For some reason, there is no output at all:
../program/soffice --headless --convert-to pdf --outdir . lock.docx
I am running the command as root, so I don't see any problems with permissions.
This is similar to this question, but I cannot convert ANY MS Office documents.
I installed LO on an EC2 instance, and it converts .docx to PDF just fine.
What areas could be causing the issue? Any suggestions on what I should be looking at?
Thanks!
Turns out I needed a whole set of dependent RPMs installed first, culminating in libGLU. I've included my additional RPM dependency tree if it will be of use:
libIDL-0.8.13-2.1.el6.x86_64.rpm
ORBit2-2.14.17-5.el6.x86_64.rpm
sgml-common-0.6.3-33.el6.noarch.rpm
GConf2-2.28.0-6.el6.x86_64.rpm
avahi-glib-0.6.25-15.el6.x86_64.rpm
gnome-vfs2-2.24.2-6.el6.x86_64.rpm
libXxf86vm-1.1.2-2.el6.x86_64.rpm
mesa-dri-filesystem-9.2-0.5.el6_5.2.x86_64.rpm
mesa-private-llvm-3.3-0.3.rc3.el6.x86_64.rpm
mesa-dri1-drivers-7.11-8.el6.x86_64.rpm (--nodeps)
mesa-dri-drivers-9.2-0.5.el6_5.2.x86_64.rpm
mesa-libGL-9.2-0.5.el6_5.2.x86_64.rpm
mesa-libGLU-9.2-0.5.el6_5.2.x86_64.rpm
I am trying to convert a *.ppt file in to *.pdf file using linux command, I am using libreoffice for Ubuntu-12.04 server and it is working fine and the command is following
sudo /usr/bin/libreoffice --headless --convert-to pdf:writer_pdf_Export /var/www/...../1234.pptx --outdir /var/www/..../
I installed libreoffice on different server having Ubuntu-14.04 but the command is not working, please suggest any solution preferably using libreoffice.
Thanks
Atul
Im trying to execute a .AIR file on a linux box (ubuntu) from the command line, and disregard the GUI.
Here's the thing. About 6mo I was able to do this, but I forgot how I did it, and I'm left to figure out how it was done by looking at clues on the server.
I see the MainSimple.air file that I had originally used.
I see that I somehow installed it into /opt/MainSimple/bin/MainSimple (which is now a binary file, not an air)
I see my script file to run that file, and it successfully executes.
--- runAir.sh ---
#!/bin/sh
export DISPLAY=:2
/opt/MainSimple/bin/MainSimple &
So my question is, now that I have a new/different air file... how do I get it to "install" or change/compile into a binary file like I did before?
I know an .air file is just a zip file.. I unzipped it, and theirs no /bin directory in it.
To install an air application from command-line, you can try this:
ln -s "/opt/Adobe AIR/Versions/1.0/Adobe AIR Application Installer" /usr/sbin/airinstall
The above command will create a symbolic link for Air Application Installer. Then, to install an air app:
airinstall app.air
To execute/run the air application, locate the binary file of your air application then run it on terminal:
/opt/MainSimple/bin/MainSimple &