Multiple export formats

  • 782 Views
  • Last Post 21 March 2016
Lennart Kloppenburg posted this 19 March 2016

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.

Order By: Standard | Newest | Votes
Oksana Serdyuk posted this 21 March 2016

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.

Lennart Kloppenburg posted this 21 March 2016

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

Close