File size exceeds with url parameter


#1

Hi,
we have a PRO PDF plan of OCR.space but we are unable to processing files that exceed 25240 KB.
This is our code
$r = $client->request(‘POST’, $apiEndpoint ,[
‘headers’ => [
‘apiKey’ => $apiKey
],
‘multipart’ => [
[‘name’ => ‘url’,‘contents’ => $urlFile],
[‘name’ => ‘isCreateSearchablePdf’,‘contents’ => ‘true’],
[‘name’ => ‘isSearchablePdfHideTextLayer’,‘contents’ => ‘true’],
[‘name’ => ‘language’,‘contents’ => ‘ita’],
[‘name’ => ‘isOverlayRequired’,‘contents’ => ‘false’],
[‘name’ => ‘scale’,‘contents’ => ‘true’],
[‘name’ => ‘filetype’,‘contents’ => ‘PDF’]
]
]);

where $urlFile is a public url and the content is a .pdf file, $apiEndpoint is ‘https://apip2.ocr.space/parse/image’ and $apiKey is a valid OCR.space api.

The server always responde with
Array
(
[OCRExitCode] => 3
[IsErroredOnProcessing] => 1
[ErrorMessage] => Array
(
[0] => File failed validation. File size exceeds the maximum size limit. Maximum size limit 25240 KB
)

[ErrorDetails] => 
[ProcessingTimeInMilliseconds] => 62

)

Where is the issue?
Regards


#3

I tryed with GET method https://apip1.ocr.space/parse/imageurl?apikey=MYAPIKEY&url=URLofPDF&isCreateSearchablePdf=true&isSearchablePdfHideTextLayer=true&scale=true&language=ita&isOverlayRequired=false&filetype=PDF

and the response of server was been

{"OCRExitCode":3,"IsErroredOnProcessing":true,"ErrorMessage":["File failed validation. File size exceeds the maximum size limit. Maximum size limit 25240 KB"],"ErrorDetails":"","ProcessingTimeInMilliseconds":"282"}

So I think is a server limitation. But…


#4

Hi, if you have a PRO PDF plan, please email team AT a9t9.com and we can change the settings in your account.