pankajr141 / pdf2jpg

Utility to convert PDF into JPG files
51 stars 21 forks source link

AttributeError: 'function' object has no attribute 'convert_pdf2jpg' #10

Closed xIneffable closed 4 years ago

xIneffable commented 4 years ago

My code is:

`def pdf2jpg():

inputpath = "File.pdf"
outputpath = myfile  #Don't worry about it, i put there path 

    # to convert all pages
result = pdf2jpg.convert_pdf2jpg(inputpath, outputpath, pages="ALL")
print(result)

if name == "main": pdf2jpg() ` Then i got error as: AttributeError: 'function' object has no attribute 'convert_pdf2jpg'

xIneffable commented 4 years ago

Found the solution. Put 'from pdf2jpg import pdf2jpg' under function