Belval/pdf2image

[WinError 267] The directory name is invalid

alinri opened this issue · 0 comments

Problem with tempfile path.
When I try to convert pdf using tempfile approach after the conversion is done when I try to access one of elements I get an exception.

This is my code:

with tempfile.TemporaryDirectory() as path:
    images_from_path = convert_from_path(
    r'C:\test.pdf', fmt='jpeg', dpi=100, output_folder=path)
    images_from_path[0]

The error happens in line 4 of the above code.

The is an image of error.
image