kandi X-RAY | unoconv Summary
kandi X-RAY | unoconv Summary
unoconv can be installed using packages coming from your distribution, or simply by copying the unoconv python script to your system. If you installed unoconv by hand, make sure you have the required LibreOffice or OpenOffice packages installed. A hard requirement is the UNO python bindings which are often inside a subpackage named libreoffice-pyuno or libobasis4.4-pyuno. Various sub-packages are needed for specific import or export filters, e.g. XML-based filters require the xsltfilter subpackage, e.g. libobasis4.4-xsltfilter.
Top functions reviewed by kandi - BETA
- Convert adoc to rst .
unoconv Key Features
unoconv Examples and Code Snippets
use Gotenberg\Gotenberg; use Gotenberg\Stream; $request = Gotenberg::libreOffice($apiUrl) ->convert(Stream::path('/path/to/my.docx')); use Gotenberg\Gotenberg; use Gotenberg\Stream; $request = Gotenberg::libreOffice($apiUrl) ->output
$app = new Silex\Application(); $app->register(new Unoconv\UnoconvServiceProvider(), array( 'unoconv.configuration' => array( 'unoconv.binaries' => '/opt/local/unoconv/bin/unoconv', 'timeout' => 42, ),
$unoconv = Unoconv\Unoconv::create(); $unoconv = Unoconv\Unoconv::create(array( 'timeout' => 42, 'unoconv.binaries' => '/opt/local/unoconv/bin/unoconv', ), $logger); $unoconv->transcode('document.docx', 'pdf', 'document.pd
Trending Discussions on unoconv
I'm making this post to you, because I'm currently doing a docker file from a UBUNTU 20.04.
In my dockerfile I run installs which for some require multiple choice questions with "interactive" answer.
So I wanted to know how I could automate the thing.
I leave you attached my docker file, I put a hash in front of the packages causing me problem....
ANSWERAnswered 2021-Dec-17 at 17:49
add the following before calling
I'm working with an ODS file in LibreOffice, and every now and then I want to convert it to CSV from the command line.
I have found two tools for this:
libreoffice --headless --convert-to csv and
unoconv -f csv but none of them works when there is an UI instance of LibreOffice running.
Is there a way to convert an ODS file to CSV from the command line, while LibreOffice UI instance is running?...
ANSWERAnswered 2020-Oct-30 at 15:29
To convert csv on the command line while LibreOffice is running, just skip the
--headless parameter. The following command (run in PowerShell) worked for me even while
/tmp/Untitled1.ods was opened in LibreOffice Calc:
& 'C:\Program Files\LibreOffice\program\soffice.exe' --convert-to csv --outdir C:\TEMP\ .\Untitled1.ods
Or similar, if the present working directory is
Linux (tested with LibreOffice 6.4.6)
.\soffice --convert-to csv --outdir C:\TEMP\ C:\TEMP\Untitled1.ods
soffice --convert-to csv --outdir /tmp/ /tmp/Untitled1.ods
On linux, you could alternatively use the
libreoffice command instead of
soffice (seems to be linux-specific...):
libreoffice --convert-to csv --outdir /tmp/ /tmp/Untitled1.ods
In all cases,
Untitled.csv was created in the expected place.
This question is focused on Windows + LibreOffice + Python 3.
I've installed LibreOffice (188.8.131.52), also
pip install unoconv and
pip install unotools (
pip install uno is another unrelated library), but still I get this error after
ModuleNotFoundError: No module named 'uno'
More generally, and as an example of use of UNO, how to open a .docx document with LibreOffice UNO and export it to PDF?
I've searched extensively on this since a few days, but I haven't found a reproducible sample code working on Windows:
headless use of
soffice.exe, see my question+answer Headless LibreOffice very slow to export to PDF on Windows (6 times slow than on Linux) and the notes on the answer: it "works" with
soffice.exe --headless ...but something closer to a COM interaction (Component Object Model) would be useful for many applications, thus this question here
Related forum post, and LibreOffice: Programming with Python Scripts, but the way uno should be installed on Windows, with Python, is not detailed; also Detailed tutorial regarding LibreOffice to Python macro writing, especially for Calc
I've also tried this (unsuccessfully): Getting python to import uno / pyuno:...
ANSWERAnswered 2020-Apr-27 at 19:19
In order to interact with LibreOffice, start an instance listening on a socket. I don't use COM much, but I think this is the equivalent of the COM interaction you asked about. This can be done most easily on the command line or using a shell script, but it can also work with a system call using a time delay and subprocess.
No vulnerabilities reported
You can use unoconv like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Reuse Trending Solutions
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page