Open DivagoNM opened 2 months ago
By default the request will response the result out put of the file after conversion.
Example:
curl -s -v \
--request POST \
--url http://127.0.0.1:2004/request \
--header 'Content-Type: multipart/form-data' \
--form "file=@/path/to/your/file.xlsx" \
--form 'convert-to=pdf' \
--output 'file.pdf'
yes, works perfect for me, i have a problem whe convert a doxc to html, i can use inline images, but if i use a standet html output, can donwnload images?
--form 'convert-to=html:HTML:EmbedImages' \ error 500 ?
Hi @DivagoNM,
Looks like currently unoserver does not support this. According to https://github.com/unoconv/unoserver/issues/110, XHTML filter may handle it, but I couldnt make it work in this API without other errors.
As a temporary workaround I just made additional API container that handles inserting the images into the html before returning the document. You can refer to https://github.com/miikatoi/unoserver-rest-api-wrapper on how to do it.
Hope it solves your problem as well.
Updating my findings here.
XHTML filter works correctly in some cases, but raises an error in others. For example:
unoconvert error: exit status 1
and shows Entity: line 3: parser error : Extra content at the end of the document
in logs.Here is the request I used:
curl -s -v \
--request POST \
--url http://127.0.0.1:2004/request \
--header 'Content-Type: multipart/form-data' \
--form 'file=@/path/to/your/file' \
--form 'convert-to=html' \
--form 'opts[]=--filter=XHTML Writer File' \
--output 'output.html'
Thanks!!
hi I try convert docx to html,it works great, but the images are stored in the unoserver folfer, how i can return this images?