Community

Multiple export formats

I want to get output in multiple export formats using the cloudservice with the example PHP script provided on the website.

The url:

$url = 'http://cloud.ocrsdk.com/processImage?language=dutch&exportFormat=xml,pdfSearchable,txt';

And the final lines (inspired by the sample script):

  $response = curl_exec($curlHandle);
  curl_close($curlHandle);

  // Let user donwload xml result
  header('Content-type: application/xml');
  header('Content-Disposition: attachment; filename="file.xml"');
  echo $response;

I only get the results from the first exportFormat parameter value, so in this case the xml. I don't get any attributes like resultUrl in said xml, as specified here. I'm rather new to this. Anyone that knows how to do this (in PHP)?

Thanks in advance.

0

Comments

2 comments

  • Avatar
    Oksana Serdyuk

    When the document is processed by our service, you will get the XML response from the service which contains the URL of the result. The result will be represented in the export format, which you have specified in the exportFormat parameter of the processing method. When you process a document with multiple export formats, the response from the service will contain up to three URLs of the results for each of the export formats correspondingly: the resultUrl attribute for the first export format, the resultUrl2 attribute for the second, and the resultUrl3 for the third.

    0
    Comment actions Permalink
  • Avatar
    Lennart Kloppenburg

    Thanks but this does not necessarily answer my question. I did figure it out, though.

    0
    Comment actions Permalink

Please sign in to leave a comment.