I was wondering if there is a way return line breaks with "exportFormat=txt" (PHP) or any other way to return each line of text on the image as a separate line and/or variable? Rich Text Format returns too much text formatting for my use.
I figured it out. I saved the response string to a file and used "fgets" to get each separate line of the file.
answered 11 Jul '12, 04:24
Can you post your code here? I am trying to do the same too
answered 28 Aug '12, 07:34
Here's the code I added to the ABBYY PHP example:
$file_name = "ocr_file"; //whatever you want to name the file(I auto generate a unique name)
$myFile = "directory of where you want to save the file/".$file_name.".txt";
//write the file
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = $response;
$file = fopen($myFile, "r") or exit("Unable to open file!");
//Output a line of the file until the end is reached
echo fgets($file). "
answered 28 Aug '12, 17:07
thanks for the code
answered 04 Sep '12, 10:38