错误:
“参数名'file'无效。有效参数:apikey,url,语言,isoverlay,base64image,iscreatesearchablepdf,issearchablepdf隐藏文本层,文件类型,地址解析,缩放,检测方向”
源代码
<script>
var formData = new FormData();
formData.append("file", 'test.pdf');
formData.append("language" , "eng");
formData.append("apikey" , "fbeeae0c1d88957");
formData.append("isOverlayRequired", 'True');
formData.append("filetype", 'pdf');
//Send OCR Parsing request asynchronously
jQuery.ajax({
url: 'https://api.ocr.space/parse/image',
data: formData,
dataType: 'json',
cache: false,
contentType: false,
processData: false,
type: 'POST',
success: function (ocrParsedResult) {
}
})
</script>