Adding a functionality to gemini ai by whch gemini could create word documents or pdf for its users

Imagine telling Gemini AI, “whip up a report on climate change in PDF format,” and it does just that! This is the future we’re exploring: Gemini creating Word docs and PDFs for you.

It’ll use its language smarts to craft your content, then handle the formatting magic to make it look polished. Think reports, emails, presentations - all within your grasp.

We’re thinking user-friendly prompts, customizable styles, and even collaboration features. Stay tuned for this exciting development that will supercharge your writing workflow!

Hey Ash, what if I told you this is very much so possible already using clever techniques. My submission “classplanner.ai” actually generates these types of documents, specifically for teachers in classrooms.

No gatekeeping here, this is how you do it… (or at least how I went about it)

Step 1.
Ask Gemini to “generate a 1 page A4 document using HTML, use advanced CSS styling techniques to make it look (your style xyz). Make use of tables, text size variations etc” - you can elaborate on this but you get the idea

Step 2.
Extract the HTML with CSS & JS if needed. Use an iframe to constrain and display the document in a fixed A4 frame.

Step 3.
Use an existing library like html2pdf or filesaver.js to save the styled content to the format of your choice.

Done! Hope this helped

this’d be really easy for you to do yourself.

Word documents (along with PowerPoint, Excel, and other Office documents) are just ZIP files (no, really. Find an office document and change the “.docx” into “.zip”). You could teach an AI the formatting of the ZIP file and then have a program to construct the document from the AI’s output.

1 Like