Linux LibreOfice Headless Conversion no Output? - linux

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

Related

unable to open Encapsulated PostScript (EPS) file in ubuntu 20.04

I have many .eps files in a folder . I just want them to see how it looks. So i tried to open .eps file using document viewer it doesnot open. Again i tried through gv file.eps still it gives error like undefined Obj.....again when i tried to open through gimp file.eps there is also some problem like opening failed: Could not interpret PostScript file. I donot know why such types of problem exist in ubuntu 20.04(may be library problem). If it is required to install some extra packages let me know. I hope some solutions from experts side. Thanks.

How to convert xlsx file to csv file using shell script?

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.

Change "LiberationSerif" font when I convert XLSX to PDF via Libreoffice in CLI (soffice)

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.

Ubuntu: command line app to convert office documents to PDF

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.

cx-freeze can't create .exe file

I have wrote a simple Python script for searching files & finding the duplicates as I am currently learning Python. Nothing complicated at all. This is also my first try of using cx-freeze to build an Windows executable. I'm using Python 3.3.
I'm using the included cxfreeze script to create .exe file. So, I've typed cxfreeze search.py --target-dir dist . Everything goes OK during buildup, and I get the 'dist' folder with files in my home directory (using Lubuntu Linux). Problem is, the Lubuntu recognises the file with the name 'search' as executable, but it hasn't got an .exe extension. On the Windows platform, it is showed just as an file without an extension. So when I try to run it on Windows XP, it just won't work. Adding an .exe extension also do not help.
Do someone have a clue what am I doing wrong?
Thanks.

Resources