def get_filesize(self, pdf):
        """Compute the filesize of the PDF
        """
        try:
            filesize = float(pdf.get_size())
            return filesize / 1024
        except (POSKeyError, TypeError):
            return 0
def get_filesize ( self , pdf ) : try : filesize = float ( pdf . get_size ( ) ) return filesize / 1024 except ( POSKeyError , TypeError ) : return 0
Compute the filesize of the PDF