BAD PDF Exception
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.
Recommended Resolution
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'
Refer to the final line for proper usage:
-F 'pdf_file=@YOUR_PDF_DOCUMENT.pdf;type=application/pdf'

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.