zrrrzzt / docker-unoconv-webservice

Dockerfile to run unoconv as a webservice
MIT License
96 stars 35 forks source link

Question: Can I use it for Jpg files ? #16

Open bcatalin opened 6 years ago

bcatalin commented 6 years ago

Hi,

The conversion from docx to pdf is working perfect. But can I convert the one docx to jpg images, one per page ?

I've tried

curl --form file=@myfile.docx http://localhost/unoconv/jpg > myfile-%d.jpg

but is not working.

I've converted the docx to pdf then I've tried to convert the pdf to jpg or png but now success, not matter of the original docx or pdf file.

The produced file is a 96 byte ASCII file with content

{"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}

So, there is way to convert the pdf to png or jpeg ?

ostasevych commented 1 year ago

The thing is that unoconv converts PDF with certain error, eg it becomes graphic file. So it is not possible to convert PDF to TXT, and when you convert PDT to ODT you are obtaining graphics but not text mime type.

Personally me, I tried to pipe unoconv to itself, but that is not working.