Read PDFs easily

I struggled while working with multi-page PDFs so now that I’ve sorta figured it out, I want to know if the code would be useful for anyone else?

My process was basically to split, convert to an image(it’s base64 string actually) and then use this as mentioned in the docs.

I’m open to suggestions on how best to put this out (if it’s of any use to anyone).

There’s this idea you could consider: Community members can contribute to the cookbook

Just putting it into a GitHub won’t be as impactful as having it incorporated into a cookbook, in my opinion. There is one competing contender, though, here: cookbook/quickstarts/PDF_Files.ipynb at main · google-gemini/cookbook · GitHub

Your solution could extend that pre-existing cookbook or you could start a new one.

Hope that helps.

1 Like

Thanks for the suggestions.
I forgot to include that my solution was for Nodejs (and I happened to get the idea from the linked cookbook)

2 Likes