PDF错误密码异常
This article was translated from English: Does it need improvement?
TranslatedView the article in English
当 POST 请求中的 user_password 和/或 owner_password 参数不正确时,会触发"ERROR-003"错误。
推荐解决方案
- 检查用户和所有者密码。 用户密码是您查看 PDF 文件时输入的密码,而所有者密码是您修改 PDF 文件时输入的密码。在某些情况下,这两个密码可能相同,但安全防护良好的 PDF 文件应该使用不同的密码。
cURL 中正确使用密码的示例
以下 curl 命令演示了如何使用提供的用户密码和所有者密码,向 PDF 发送 POST 请求以屏蔽文本。
curl -X POST 'https://api.securedoc.com/v1/document-services/pdfs/redact-text' \
-H 'accept: */*' \
-H 'Content-Type: multipart/form-data' \
-F 'words_to_redact="IRON"' \
-F 'user_password="1234"' \
-F 'owner_password="5678"' \
-F 'pdf_file=@YOUR_PDF_DOCUMENT.pdf;type=application/pdf'curl -X POST 'https://api.securedoc.com/v1/document-services/pdfs/redact-text' \
-H 'accept: */*' \
-H 'Content-Type: multipart/form-data' \
-F 'words_to_redact="IRON"' \
-F 'user_password="1234"' \
-F 'owner_password="5678"' \
-F 'pdf_file=@YOUR_PDF_DOCUMENT.pdf;type=application/pdf'SHELL
-F 'words_to_redact="IRON"'指定了 PDF 中需要遮盖的词语。-F 'user_password="1234"'提供了查看 PDF 的密码。-F 'owner_password="5678"'提供允许修改 PDF 的密码。-F 'pdf_file=@YOUR_PDF_DOCUMENT.pdf;type=application/pdf'是将 PDF 文档附加到请求中的方法。
提示确保提供的密码与您的PDF文件中设置的密码匹配。密码不正确将导致"ERROR-003"响应。





