Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from wand.image import Image as wi
- import io
- pdf = wi(filename = "sample2.pdf", resolution = 300)
- ---------------------------------------------------------------------------
- DelegateError Traceback (most recent call last)
- <ipython-input-6-3e32bc349c64> in <module>()
- 4
- 5 # reading the pdf file
- ----> 6 pdf = wi(filename = "sample2.pdf", resolution = 300)
- 7 # and converting it to jpeg
- 8 pdfImage = pdf.convert('jpeg')
- ~Anaconda3libsite-packageswandimage.py in __init__(self, image, blob, file, filename, format, width, height, depth, background, resolution)
- 2742 self.read(blob=blob, resolution=resolution)
- 2743 elif filename is not None:
- -> 2744 self.read(filename=filename, resolution=resolution)
- 2745 # clear the wand format, otherwise any subsequent call to
- 2746 # MagickGetImageBlob will silently change the image to this
- ~Anaconda3libsite-packageswandimage.py in read(self, file, filename, blob, resolution)
- 2820 r = library.MagickReadImage(self.wand, filename)
- 2821 if not r:
- -> 2822 self.raise_exception()
- 2823
- 2824 def close(self):
- ~Anaconda3libsite-packageswandresource.py in raise_exception(self, stacklevel)
- 220 warnings.warn(e, stacklevel=stacklevel + 1)
- 221 elif isinstance(e, Exception):
- --> 222 raise e
- 223
- 224 def __enter__(self):
- DelegateError: PDFDelegateFailed `The system cannot find the file specified.
- ' @ error/pdf.c/ReadPDFImage/809
Add Comment
Please, Sign In to add comment