DanielCCF / BotGamesAA

It contains the solutions for the Automation Anywhere Bot Games- Aug/2021.
MIT License
2 stars 1 forks source link

Regarding your week 4 botgames, using PDF instead of .tiff #3

Open Domsdorm opened 3 years ago

Domsdorm commented 3 years ago

Hi Daniel,

I was away from this project for awhile. Regard my previous question of using PDFs instead of the .tiff picture format used in the botgame week 4 challenge, I am having trouble creating the function for converting the PDFs into image format.

I create a function: def convert_invoice_from_pdf_to_image(filename)

but my code does not work. How do I code it to allow the script to process the PDF. And also, for this portion of your code:

Extracting all invoices data

invoiceData = [] os.chdir(dir) for imageName in glob.glob("*.tiff"):

Building the file name and extracting its information

filename = os.path.join(dir, imageName)
output = get_text_from_image(filename)

How do i alter it to include the function. I apologise if it is a very basic and noob question 😅, I am pretty new to coding hahaha. Thank you so much for your reply previously and i hope you could help me out. Thank you!!

DanielCCF commented 2 years ago

Hi Domsdorm!

No worries, I'm also a bit busy with other things xD. Could you please post how it's breaking? Also, the function for the pdf conversion and error message.

I'm asking this because the code can break for different reasons, like:

See you soon!