1

I am trying to call my OpenOffice conversion API with following data:

{
    "async": false,
    "filetype": "docx",
    "key": "Khirz6zgfTPdfd7",
    "outputtype": "pdf",
    "title": "Example Document Title.docx",
    "url": "https://calibre-ebook.com/downloads/demos/demo.docx"
}

I am not certain about key property value, I used Khirz6zgfTPdfd7 which is also used in their example on https://api.onlyoffice.com/editors/conversionapi ; the document is also not the one stored on docserver.

The response I retrieve is:

<?xml version="1.0" encoding="utf-8"?><FileResult><Error>-1</Error></FileResult>

when means Unknown error.

I suppose the problem might be either in key or document URL. Can I use document that is not stored on docserver and how to generate the key properly?

Or do you think I miss something else?

michal.jakubeczy
  • 8,221
  • 1
  • 59
  • 63

1 Answers1

0

I am trying to call my OpenOffice conversion API with following data

Seems to be ok, please send log files from /onlyoffice/documentserver/converter/ and /onlyoffice/documentserver/docservice/

ibnpetr
  • 472
  • 2
  • 5
  • I realized that using GET request and QueryString works. It's strange as this was supported prior to 4.2 version and I am sure our version is at least higher than 4.2.3 (because I can convert more than one page - fixed in 4.2.3). Do you know how do I realize which version do we have only with API access? – michal.jakubeczy Aug 16 '18 at 11:30
  • @jabko87 servername/index.html – ibnpetr Aug 16 '18 at 13:19
  • @jabko87 but that shouldn't be a reason. Could you please send an example of the request – ibnpetr Aug 16 '18 at 13:26
  • we're on Version: 5.1.4. Build: 22 POST looks exactly like I posted above and get is: https://{docserver}/ConvertService.ashx?async=false&filetype=docx&key=aaaa&outputtype=pdf&title=Example.docx&url=http://file-examples.com/wp-content/uploads/2017/02/file-sample_100kB.doc ... this one works perfectly – michal.jakubeczy Aug 16 '18 at 13:45
  • also we receive some download link for converted file and when we access it ... it offers 'output.pdf' file for download, regardless what title parameter says ... is there any possibility to define downloaded file name to be the same as converted one (e.g. if I convert document.docx I would like to download document.pdf and not output.pdf) – michal.jakubeczy Aug 16 '18 at 14:28