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
13
votes
5 answers

AWS Lambda Alpine Python Container shows IMAGE Launch error exec format error

I am writing a Lambda function to convert an excel file to PDF using unoconv with libreoffice, for this I am using alpine base image. The Dockerfile is as follows. # Define global args ARG FUNCTION_DIR="/home/app/" ARG RUNTIME_VERSION="3.9" ARG…
Ajeesh Joshy
  • 1,387
  • 2
  • 18
  • 32
11
votes
2 answers

Using two commands (using pipe |) with spawn

I'm converting a doc to a pdf (unoconv) in memory and printing (pdftotext) in the terminal with: unoconv -f pdf --stdout sample.doc | pdftotext -layout -enc UTF-8 - out.txt Is working. Now i want use this command with child_process.spawn: let…
user5526811
5
votes
2 answers

PHP exec fail without errors

I would like to automate the exportation of .odf file to .pdf. I tried something called unoconv. When typed in the Windows command prompt, everything is right. >"C:\Program Files (x86)\OpenOffice 4\program\python.exe" "C:\Program Files…
Atnaize
  • 1,766
  • 5
  • 25
  • 54
4
votes
1 answer

unoconv with --stdin not working

I am using unoconv to convert docx to pdf. All works great as long as I am passing the document via file name: $ unoconv -f pdf --stdout test.docx But as soon as I am using --stdin it doesn't work anymore: $ unoconv -f pdf --stdin --stdout <…
Werzi2001
  • 2,035
  • 1
  • 18
  • 41
3
votes
1 answer

Context deadline exceeded- goteberg api (/forms/libreoffice/convert)

I am trying to convert ms-office files to pdf using gotenberg api. For some files, i am getting unoconv PDF context deadline exceeded with 503 status. I have increased the read, write and process timeout to 60 secs. How can i resolve this issue?…
3
votes
1 answer

'unoconv' script works in terminal but not when called through an exec() function in my laravel controller

I'm trying to use the following shell script to convert a docx file into a pdf: unoconv -f pdf tempfile.docx In Laravel, I have a controller function which I create a temp docx file using phpWord that I need to convert into a pdf and return the…
movac
  • 1,576
  • 3
  • 21
  • 45
3
votes
0 answers

how to run unoconv command directly from windows command prompt

I am trying to use unoconv for file conversion I have downloaded LibreOffice and added C:\Program Files (x86)\LibreOffice 5\program , path where python.exe, pyuno.pyd and soffice.exe resides, to system path variable, so that when I run…
Uttara
  • 2,496
  • 3
  • 24
  • 35
3
votes
1 answer

Unoconv/libreoffice command line convert very slow

I'm using unoconv or libreoffice to convert documents, odt->pdf, by PHP exec(). This process is very fast on one of my server (about 1s). Now I have another, much faster server, and this process is taking almost 20s! And it's with the same, small…
M_per
  • 313
  • 2
  • 12
2
votes
0 answers

Convert specific sheet with unoconv

I have xlsx file with multiple sheets and i need to convert it to csv file. I need convert only one specific sheet, i'm using unoconv but unoconv convert only first sheet from file and finish. I try to find some flag from unoconv documentation for…
sbps
  • 21
  • 2
2
votes
0 answers

Losing MathML when converting from HTML to Docx using LibreOffice

I am using LibreOffice to convert a .docx file to an XHTML file. Mathematics is converted to MathML. My plan is to use LibreOffice in headless mode (or tools based on it) to convert back the XHTML file to a Docx file but after this conversion…
Opusci
  • 21
  • 2
2
votes
0 answers

Problems converting from pptx to pdf with unoconv

I am using UNOCONV to convert pptx files to pdf. It works beautifully, but it prints the name of the slide on top, I haven't found a way to fix it. Do you have any recommendations? This is the code I am using: # requirements # sudo apt install…
2
votes
1 answer

How to use unoconv with a newer version of libreoffice

I am trying to convert encrypted documents (doc/docx) into PDF using python. What I do is: first decrypt them temporarily in a separate folder use the unoconv command line to convert the decrypted file into pdf: unoconv -f pdf…
John Gardounis
  • 125
  • 1
  • 12
2
votes
0 answers

Different encoding in file retrieved via curl or node request module

I am currently having problems with what I think might be the encoding of a retrieved file from the unoconv service. I am using a this docker container which provides uniconv as a webservice and trying to convert docx files do pdf I am being…
lcmp
  • 117
  • 1
  • 6
2
votes
0 answers

Multithreaded unoconv (libreoffice)

I am trying to convert a few large .doc and .rtf files to PDF on linux. The command is: unoconv -f pdf largefile.doc My machine has 8 cores, however when i run htop, it shows that only 1 core is being used at 100%. And the conversion takes several…
ierdna
  • 5,753
  • 7
  • 50
  • 84
2
votes
1 answer

Thoroughly cofused about using .doc APIs

Let me start off by saying my python knowledge is beginner-to-intermediate level, and I recently started using the language again after a long time. The Goal: This morning I came across a bunch of word documents I wanted to convert and concatenate…
1
2 3 4