Watson Discovery APIs to extract text from a PDF document not successful

I was trying to use the watson's discovery API to extract text from a PDF file but it is not running successfully as in some PDFs the whole text is not getting extracted, only some portion of text is getting extracted. Can you tell me how to resolve this issue?