Search code examples
phponlyoffice

onlyoffice : How to retrieve document after conversion


I'm using onlyoffice to convert a file from docx to pdf (Documentation here : https://api.onlyoffice.com/editors/conversionapi).

I use curl to execute the example, and it works. I get the file url back, but the only issue is that when I try using this url (in a browser or downloading with file_get_contents), I have a 403 error.

There is nothing in the documentation that speak about the next steps post conversion, so I was wondering if someone could give me a hint. Is there an api method undocumented or something like that ?

Thanks


Solution

  • The url in the xml back is sent back with html characters in it.

    htmlspecialchars_decode on the url resolved my issue.