def tif_to_pdf(self):
        """tiff to pdf conversion, use tiff2pdf command (libtiff)"""
        path = os.path.join(os.path.dirname(self.filepath), self.document) + '.pdf'
        p = Popen('tiff2pdf -o %s %s' % (path, self.filepath), shell=True, stdout=PIPE, stderr=PIPE)
        stdout, stderr = p.communicate()
        content = open(path, 'rb').read()
        p = Popen('rm -rf %s' % path, shell=True,stdout=PIPE, stderr=PIPE)
        return ['application/pdf', content]
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/libraries/adlibre/converter.py/FileConverter.tif_to_pdf/original