Dynamic document to PDF

Hey :slight_smile:
I’m writting to you because I spend (to much) time looking for a solution :sweat_smile:

I have a form on my app, wich the user can fill out.
I also have a docx template, and I would like it to be dynamically filled with the fields the user has filled in.

I have tried to use PDF Conjurer but it’s not accurate enough and I would have to create my template from scratch. I also tried docMaker but I can’t add images. And now I’m trying to use PDF Monkey, but same problem, I have to create my template from scratch in HTML and it’s not really easy because the template I have is an official one and quite difficult…

If someone could help me, if you have any other solutions, plug-ins, tools or anything that can help me :slight_smile:
Thanks a lot,

Best,
Lorène

2 Likes

Hi @lorenebergougnoux ,

We’ve also tried using PDF Conjurer and it really works. We were able to customize the field for the display. May or might just need some adjustments to the workflow.

but i have a really complex/official template and I think PDF conjurer is definitely not the best tool to create it

Yes, I understand exactly the problem. PDF Conjuror will take you a long way (and is generally great). However it is difficult to get something very exact with high design values, or in particular control the page breaks. It’s a common problem with generating PDFs from web pages (like you do in Bubble).

One option for Docx templates is https://www.docmosis.com/ - but this has its own problems. (and costs)

I’m doing some experiments using Google Docs as a template and it solves part of the problem really nicely. I’ll let you know when I’ve got something concrete to show.

@klobassimon @jizreel_alencar

1 Like

Hi @lorenebergougnoux, if your template has complex data to show I recommend using Google sheets, you just send data to a spreadsheet file and get the pdf from one or more of its sheets, I use this strategy to generate solar panel proposals which are very complex. The great point is that you can do calculations and even build charts on the go with Google sheets.
The problem with sheets is that you can not have footer and header automatically, if this is important you should use Google docs, as @lindsay_knowcode said, but Google docs does not accept charts and complex calculations, the solution is to calculate things a step before in your app, convert charts into images and then send all this stuff to Google docs, it works.

2 Likes

do you think I can just send data and get it back on a google docs? if it is possible, how can I do it?

actually, the data is not complex, it’s just the template I have to use because it is an official government template (education stuff)

As Lindsay said, he is working on a plugin to connect bubble to google docs, but if you can’t wait for that, you can folllow this steps:

  1. Install the plugin Google Service Account from Nicholas Barrow;
  2. Create (if you dont have yet) an account at Google Workspace and use it to access Google cloud too. For instructions on this step see the docs of the plugin Google Service Account.
  3. With the plugin Google Service Account and the google accounts set up properly you can generate google access tokens to use in the 4th step;
  4. Use the Drive API to copy the docs template file, then use the google docs API to send data to the copied file and then retrieve the PDF by adding some parameters to the doc url, as example below.
    https://docs.google.com/document/d/[document Id]/export?format=pdf&access_token=[access token]
    I’m a freelancer and I can set up all that stuff within a few hours, if you’re interested reach out to me.
2 Likes

You can add images with docMaker…

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.