You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Apps Script Community
If you’ve used my [Convert any file with Apps Script](https://ramblings.mcpher.com/gassnippets2/apps-script-file-conversions/) you’ll know that it can take a wide range of files (currently 53 different mimeTypes, 42 types of imports, and 26 kinds of exports) and convert from one format to another. It uses the import and export functionality of the Drive API to find a route (sometimes involving multiple conversions) to, for example, turn a microsoft word file into a pdf. However, it can’t make image files from anything other than image files in other image formats. This has been a problem when using the free tier [Gemini flash api](https://blog.google/technology/ai/google-gemini-update-flash-ai-assistant-io-2024/). At the time of writing, Gemini only supports media input in image format. Since the [Convert any file with Apps Script](https://ramblings.mcpher.com/gassnippets2/apps-script-file-conversions/) library can already convert most types to pdf, it seemed to me that a new library convert pdfs to images would be handy. This article is about that. There’ll be future articles about applying the results to the [Gemini API](https://ai.google.dev/gemini-api/docs/api-overview)