Open willmakenoise opened 1 month ago
Hi @willmakenoise ,
I was facing the same issue, but eventually discovered that breaking down
'--form 'opts[]=--filter-options foo=bar'
into two separate lines:
--form 'opts[]=--filter-options'
--form 'foo=bar'
did the trick.The commands worked fine inside the container, but from requests they were not being formatted correctly into the unoconvert command. Maybe it has something to do with the space character.
For reference, here is a command that succesfully returned pages 1 and 2 in my case.
curl -s -v \
--request POST \
--url http://127.0.0.1:2004/request \
--header 'Content-Type: multipart/form-data' \
--form "file=@demo.docx" \
--form 'convert-to=pdf' \
--form 'opts[]=--filter-options' \
--form 'opts[]=PageRange=1-2' \
--output 'file.pdf'
Hope it solves your issue too!
Thank you @miikatoi!
That worked beautifully 😀
Hi,
I'm trying to pass filter-options to the rest api, but I'm getting an error: "unoconvert error: exit status 2"
I've tried several different options with the same result.
Here is an example request:
Any ideas?