PDF integration using Docmosis

Hi fellow Wapplers…

New to the community and I have come from Bubble. Still learning my way around Wappler but making slow progress thanks to Brian English and his fantastic video collection.

I have a technical issue which I am hoping someone can help out with.

I have successfully setup an API call for Docmosis - a fantastic service that can merge word doc templates into PDF. I am calling the API which sends me back a response in the form of a Base64 encoded PDF file. This is the part that I am struggling with. I need to be able to decode this in Wappler as a step after the API, and then download the file. Can anyone help with this by showing me some screenshots (if possible). Again, I am new to Wappler and still getting my head around server actions etc as Bubble has made some of these tasks much more simpler. How do I download the file? Server side? Client side? If client side, how do I send the file to the client side?

Any feedback would be greatly appreciated.

Thanks again,
David

1 Like

Hey David…Welcome!

Not sure this extension will work for your use case, but have a look:

Thank you for your response! How do I install extensions? My Wappler stack is: NodeJS/Postgress/Docker

Refer the docs here: About the Wappler Extensions category

Thanks you, so far this has been very helpful. I have managed to install the module. I am not sure what to put in as the file path. Any tips?

My API steps are as follows:

  1. Execute the module as above (need a file path - this is where I am stuck
  2. File download - also need a file path - ths is also where I am stuck.

Any tips would be greatly appreciated.

Thanks

Haven’t used this module. @jellederijke would have answers you seek.

Hi @daves88,

I also came from Bubble and I do see and feel your struggles! It can be quite the step from Bubble to Wappler, but if you persist the end result is totally worth it (I think)!

Happy to help you get this extension working. What exactly did you fill in and what is not working for you?

This is a screenshot of a working setup doing something similar to your case. Calling some API getting some pdf in base64 and changing this to a binary file.

Let me know if you have any other questions.

1 Like

@daves88

The Base64String would be where you enter the API response node containing the base64 string.

The path can be anywhere inside the public folder, and you might want to append a unique filename to it, this is where the converted Base64 is stored.

The file download would be accessible from the public folder.
For example:

/public/pdfdocs/mydoc.pdf = http://localhost:3000/pdfdocs/mydoc.pdf

1 Like

Wow!! Thank you for that! I finally have it working. I love this small community, you guys really take the time to help out.

I have definitely had my moments where I wanted to throw in the towel with Wappler, as Bubble makes certain things so easy. I am going to persist through though as I know the reward is worth it.

Glad to have a helpful community to turn to when I get stuck.

Thanks again to everyone on this thread who has helped me.

2 Likes