I received a PDF from clippercard.com that has "%PDF-1.3 " as the first line - note the space character after the "3". This causes rsc.io/pdf to fail to parse the PDF file. The PDF file in question has a number of space characters at the end of lines which cause the PDF library to alternately return these errors, depending on which space characters you fix:
not a PDF file: invalid header
malformed PDF: cross-reference table not found: ref
malformed PDF file: missing final startxref
Chrome, Mozilla Firefox and Preview.app have no problem displaying the PDF in question.