def test_pdf_to_images(self): if not os.popen("which pdftoppm").read().strip(): warn("pdftoppm not found, skipping test") return blob = self.read_file("onepage.pdf") image = converter.to_image("", blob, "application/pdf", 0) assert "image/jpeg" == mime_sniffer.from_buffer(image)
def test_pdf_to_images(converter): if not os.popen("which pdftoppm").read().strip(): warn("pdftoppm not found, skipping test") return blob = read_file("onepage.pdf") image = converter.to_image("", blob, "application/pdf", 0) assert "image/jpeg" == mime_sniffer.from_buffer(image)
def test_pdf_to_text(self): if not os.popen("which pdftotex").read().strip(): warn("pdftotext not found, skipping test") return blob = self.read_file("onepage.pdf") text = converter.to_text("", blob, "application/pdf")