Guest User

Untitled

a guest
Nov 20th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. from wand.image import Image as wi
  2. import io
  3. pdf = wi(filename = "sample2.pdf", resolution = 300)
  4.  
  5. ---------------------------------------------------------------------------
  6. DelegateError Traceback (most recent call last)
  7. <ipython-input-6-3e32bc349c64> in <module>()
  8. 4
  9. 5 # reading the pdf file
  10. ----> 6 pdf = wi(filename = "sample2.pdf", resolution = 300)
  11. 7 # and converting it to jpeg
  12. 8 pdfImage = pdf.convert('jpeg')
  13.  
  14. ~Anaconda3libsite-packageswandimage.py in __init__(self, image, blob, file, filename, format, width, height, depth, background, resolution)
  15. 2742 self.read(blob=blob, resolution=resolution)
  16. 2743 elif filename is not None:
  17. -> 2744 self.read(filename=filename, resolution=resolution)
  18. 2745 # clear the wand format, otherwise any subsequent call to
  19. 2746 # MagickGetImageBlob will silently change the image to this
  20.  
  21. ~Anaconda3libsite-packageswandimage.py in read(self, file, filename, blob, resolution)
  22. 2820 r = library.MagickReadImage(self.wand, filename)
  23. 2821 if not r:
  24. -> 2822 self.raise_exception()
  25. 2823
  26. 2824 def close(self):
  27.  
  28. ~Anaconda3libsite-packageswandresource.py in raise_exception(self, stacklevel)
  29. 220 warnings.warn(e, stacklevel=stacklevel + 1)
  30. 221 elif isinstance(e, Exception):
  31. --> 222 raise e
  32. 223
  33. 224 def __enter__(self):
  34.  
  35. DelegateError: PDFDelegateFailed `The system cannot find the file specified.
  36. ' @ error/pdf.c/ReadPDFImage/809
Add Comment
Please, Sign In to add comment