(self, data)
Inspect PDF header and return version
Inspect PDF header and return version
Inspect PDF header and return version
def _get_pdf_version(self, data):
        """
        Inspect PDF header and return version
        """
        header_ver = re.compile('%PDF-([A-Za-z0-9\.]{1,3})[\r\n]', re.M)
        matches = header_ver.match(data)
        if matches:
            return matches.group(1)
        else:
            return "0.0"
def _get_pdf_version ( self , data ) : header_ver = re . compile ( '%PDF-([A-Za-z0-9\.]{1,3})[\r\n]' , re . M ) matches = header_ver . match ( data ) if matches : return matches . group ( 1 ) else : return "0.0"