Questions tagged [unoconv]

Universal Office Converter - Convert between any document format supported by LibreOffice/OpenOffice.

Universal Office Converter (unoconv) is a command line tool to convert any document format that LibreOffice can import to any document format that LibreOffice can export. It makes use of the LibreOffice’s UNO bindings for non-interactive conversion of documents.

57 questions
2
votes
2 answers

run exec in php for converting file using unoconv

I'm trying to convert HTML file into RTF file using unoconv in php. From php I'm calling : ...... file_put_contents("/tmp/unoconv55b2862fea753.html", $content); $command = "unoconv -f rtf -o /tmp/unoconv55b2862fea753.rtf…
jalco
  • 49
  • 2
  • 6
1
vote
0 answers

convert a docx file into pdf file using unoconv. It's taking too long and aborted

convert a docx file into pdf file using unoconv. It's taking too long and aborted DOCX to pdf conversion command: unoconv -f pdf -o sample.pdf sample.docx Download the sammple docx file
1
vote
0 answers

Problem converting CSV to XLS, using unoconv

I have a file that I need to convert to XLS and upload to the site. But this site is very format sensitive. If I convert the file on my local machine (Ubuntu 20.04.3 LTS), everything is fine. If on the server (Ubuntu 20.04.3 LTS) an error occurs.…
necen98715
  • 11
  • 1
1
vote
3 answers

Error converting docx to pdf using Unoconv

I am trying to convert .docx files to .pdf files using Unoconv. Libreoffice is installed on my server and the script works for another website on the server. Using the line use Unoconv\Unoconv; results in an HTTP ERROR 500. Does someone know why I…
John
  • 904
  • 8
  • 22
  • 56
1
vote
0 answers

Headers goes missing on conversion of .csv file to .xls using unoconv

On converting a .csv file to .xls file using unoconv, columns goes missing after IV column in xls file. I am using shell_exec to execute the command in the PHP code like -- shell_exec('sudo unoconv -f xls test.csv --output=test.xls') test.csv…
sahil
  • 11
  • 1
1
vote
2 answers

How to trigger AutoFit / SetOptimalHeight in LibreOffice Calc programmatically?

I'm using unoconv to convert XLSX => PDF. I need LibreOffice to wrap text and increase row heights dynamically depending on the contents of the XLSX file. Is there a way to do this programmatically, maybe at the unoconv/soffice level?
ldiqual
  • 15,015
  • 6
  • 52
  • 90
1
vote
0 answers

Unoconv call (openoffice) from other container

I am new in linux and docker. I need to convert odt files to pdf from php container. I use php-5.6-apache and https://github.com/xiaojun207/openoffice4-daemon: sudo docker build --pull -t xiaojun207/openoffice4-daemon –build-arg OO_VERSION=4.1.7…
Honza
  • 65
  • 6
1
vote
0 answers

How do I automate xlsx to pdf conversion in Node?

I hope you´re all doing well. As the title mentions, I´ve been looking for a way to automate file conversion from xlsx to pdf in node js. I found the Convert API https://www.convertapi.com/ which seemed to work pretty well after I tried it but…
rickyk95
  • 11
  • 6
1
vote
1 answer

How to run unoconv via subprocess in django python?

If I run unoconv -f pdf test_pdf.docx in terminal, it's working fine. But if I run it in subprocess, I got this error subprocess.run(['unoconv', '-f', 'pdf', path], shell=True) unoconv: Cannot find a suitable pyuno library and python binary…
VinhVuong
  • 23
  • 6
1
vote
1 answer

Unoconv and IIS perimission issues

Looking for some advise on setting up Unoconv on IIS. I am trying to run this via PHP but I get the following error. Verbosity set to level 3 Using office base path: C:\Program Files\LibreOffice Using office binary path: C:\Program…
user2249605
1
vote
1 answer

Unoconv fill merged cells with value

I am using unoconv to convert different xlsx reports into csv. One of the reports has a merged cell like below. Column_1 Column_2 Column_3 Column_4 C ABC DEF 123 ABC DEF 123 ABC DEF …
user2058738
  • 349
  • 1
  • 6
  • 15
1
vote
2 answers

Removing new line from CSV file

I have a script that converts excel file into csv using unoconv. I noticed that some records in the csv is added as a new line due to particular format in excel. I was wondering if there is anyway this can be handled in unix. sample problematic…
user2058738
  • 349
  • 1
  • 6
  • 15
1
vote
1 answer

Unoconv convert excel to csv with semicolon without quotes

I'm doing a simple command for convert excel to csv with semicolon unoconv -f csv -e FilterOptions="59,34,0,1" filex.xlsx but the results appears with quotes like this "name";"lastname";"age" How could I convert without quotes?
alberto
  • 49
  • 8
1
vote
1 answer

UNOCONV failing to convert files in PHP on CentOS

I have UNOCONV library installed on my CentOS 7.3.16.11. When I run file conversion from CLI it works fine, and I'm getting PDF document back: unoconv -d spreadsheet --format=pdf -o temp/ ./document.docx But when I try to execute it from PHP…
Dzianis Z.
  • 11
  • 3
1
vote
1 answer

Can't get unoconv to work without X

I'm trying to convert a Word document to plain text, and get this error: user@server$ unoconv --format=txt test.docx /usr/lib64/libreoffice/program/soffice.bin X11 error: Can't open display: Set DISPLAY environment variable, use -display…
Roadhouse
  • 187
  • 3
  • 11