错误的PDF异常
2021年十一月2日
更新 2024年十月20日
This article was translated from English: Does it need improvement?
TranslatedView the article in English
当 POST 请求中的 pdf_file 参数未被检测为 PDF 时,会出现 "ERROR-002" 错误。 确保您拥有一个有效的PDF,其type=application/pdf
推荐解决方案
提示
确保
POST请求中的pdf_file参数类型为:application/pdf。在 cURL 中 pdf_file 正确语法的示例:
curl -X POST 'https://api.securedoc.com/v1/document-services/pdfs/redact-text?words_to_redact=IRON' \
-H 'accept: */*' \
-H 'Content-Type: multipart/form-data' \
-F 'pdf_file=@YOUR_PDF_DOCUMENT.pdf;type=application/pdf'curl -X POST 'https://api.securedoc.com/v1/document-services/pdfs/redact-text?words_to_redact=IRON' \
-H 'accept: */*' \
-H 'Content-Type: multipart/form-data' \
-F 'pdf_file=@YOUR_PDF_DOCUMENT.pdf;type=application/pdf'CURL
请参考最后一行以正确使用:
-F 'pdf_file=@YOUR_PDF_DOCUMENT.pdf;type=application/pdf'


