BAD PDF Exception

This article was translated from English: Does it need improvement?
Translated
View the article in English

The "ERROR-002" error occurs when the pdf_file parameter in the POST request is not detected as a PDF. Ensure you have a valid PDF with type=application/pdf.

ConsejosEnsure the pdf_file parameter is of type application/pdf in the POST request.

Example of pdf_file proper syntax in cURL:

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'
SHELL

Refer to the final line for proper usage:

-F 'pdf_file=@YOUR_PDF_DOCUMENT.pdf;type=application/pdf'

Curtis Chau
Escritor Técnico

Curtis Chau tiene una licenciatura en Ciencias de la Computación (Carleton University) y se especializa en el desarrollo front-end con experiencia en Node.js, TypeScript, JavaScript y React. Apasionado por crear interfaces de usuario intuitivas y estéticamente agradables, disfruta trabajando con frameworks modernos y creando manuales bien ...

Leer más
¿Listo para empezar?
Versión: 2024.10 recién lanzado