Forum Documentation Showcase Pricing Learn more

PDF Conjurer (updated free plugin, now saving to database)

Thank you for this @Lucien!

@ryanck Saving the PDF is halfway done, I already have it saving to Bubble database and optionally making the PDF private, I’ll just test it some more and then release to the public. Still no ETA.

Hi @cajudick, the image is only loaded once, just make sure you’re uploading it only once and then retyping its name in case you insert it more than once.
About the Z-axis, there are features (mainly “background” feature) for this in the underlying engine, but I haven’t implemented that. It’s on the list and apparently an easy one. After the “save back to the database” feature I’ll look into it.

1 Like

So does this mean sending the generated PDF in an e-mail workflow is soon possible ? :wink:

1 Like

Nice! What about when you have a RG that´s not fixed? Just like the one you can have in an invoice with invoice lines?

Is that possible?

Thanks a lot.

I’m not understanding, you’re talking about taking data from a repeating group in the Bubble page and putting it into the PDF?
Or you’re talking about conditionally inserting elements into the PDF?
Can you tell me a bit more so I can get it? :slight_smile:

1 Like

Hi @vini_brito,

Well I was just thinking about the repeating group but just because it´s the only way I know (I don´t know coding). Right know we´re doing it with select pdf but it takes too long to export to pdf and your solution is much more faster.

Hope now it makes sense.

Let me know if I can help.

Thank you!

You want the data from a RG in a table made by the PDF plugin or to screenshot the RG and insert it as an image into the PDF?

1 Like

Hi @vini_brito,

I want the data from a RG table since when you´ve loads of invoices saved to your computer you search for the invoice lines terms often.

Hope it makes sense and it is possible with your plugin.

Let me know if I can help.

Thanks a lot and have a good day.

Well, if I’m understanding correctly, you can just have a RG list all the data you want and then create a table element into the PDF and then set its column’s data sources as “repeating group list of Invoice’s Product Name” or something like that. Very straightforward.

1 Like

Hi there @vini_brito,

Oh, I didn´t know it was possible. I saw the last two lines of this post (PDF Conjurer (updated free plugin, now saving to database)) where @Lucien says “Nb: it won’t be easy to adapt it for a number of rows that can vary.” and thought it would be super difficult.

Thanks a lot for your help.

Been on a bubble hiatus for about 3 months! last I left I wasn’t able to fully use your plugin, mainly due to not being able to get the invoice to come out looking how I wanted. I’m posting a print to pdf version of a invoice to show you what I’m trying to do. Appreciate your hard work on this! I’m going to start from scratch to see how close I can get with all your new updates over last few months.

1 Like

Hi Ryanck! I meant for the page numbering (but maybe you can do without it) and grey line to separate each row (but maybe you are fine without that too).

Hi there @Lucien,

Thanks for your reply. Now it makes more sense. I need to try the approach and hope it´s possible to have a grey line to separate each row and to put all the invoice lines there.

Have a nice day.

You’ve got me thinking… would bubble allow a plugin to do such thing?
I use very few plugins other then the ones made by bubble team in my apps.
Could a 3rd party plugin collect data that flows through it without letting the app owner know about it?

Yes, perfectly possible, for example when you set up something like google analytics or hotjar, that’s exactly what’s happening. Also with our smartphones, everything is tracked and reported back to, for example, phone manufacturer or phone software provider, so they know how we type, who we talk to, etc. The main difference is the intention of the developer or organization.

Someone malicious could indeed try to setup a plugin to steal the app’s data, but Bubble has security measures in place in order to prevent that, so I don’t know if such attempt would be successful.

Also, to help myself I try not to bloat my app with plugins, that’s usually a bad choice for a variety of reasons.

1 Like

Seems like a fantastic plugin! On my app users will be generating a lot of pdfs on both mobile and desktop, and our company wants to make sure we also have a copy of the pdf that is generated for our files. So the saving to bubble and/or integration with an email plugin would be huge for us! Very much looking forward to the next update, thanks!

2 Likes

Hey people for some reason I can’t get to edit the opening post, so I’ll insert new instructions regarding changes here.

Update: Now saving back to the database! This is a backward compatible change (non breaking change).

Yes it works on mobile browsers, just like the rest of the plugin. :smile:

So, a long awaited and much requested feature was to save our PDF files into our app’s storage.
Here it is! This is how you do it:

Step 1 is as easy as checking a box in the final workflow action. That’s what it is!

Then you click this custom event that the plugin gives you:

Then at that event you build the workflow that will execute your logic regarding how you want to save the link to the PDF file. In this picture I’m creating a sample thing I called in its data type “A file”. It’s just a thing with three text fields.

Here’s a similar logic with a few differences.

See? Just three text fields for that first example.

And a single text field on that second example.

Here’s how the first example looks in my database after the first run. Just so you see what kind of text comes from each of the options. And at what time of the day I was working on this :joy:


The text I have at the field to explain it is this one:

If this is enabled, you will be able to use this plugin’s custom event called “PDF uploaded and available in element state”, there you’ll be able to save the file’s URL to a text field in a thing in Bubble’s database.
Note that it comes like this: //aws.com/23892378/filename so you must append the https: or http: for it to work as a link when displaying.

But I suggest you to save it in that original state, Bubble apparently uses it as it is for some things. When that event is triggered, the PDF will already be uploaded to your app’s storage and the link will be in the PDF Model element custom state called “Saved PDF’s URL”.
Note that it will be available in the same “PDF Model X” element that was used to create the file.

Also, if you want to restrict access to the file (make it private), you can. This is the explanation for it, found right below the field to attach the pdf to a thing:

Optional. Required if you want this file to be private. Else anyone with the link will be able to access it. Check https://bubble.io/reference#Elements.FileInput.attach_to and https://bubble.io/reference#Data.Privacy.permissions.view_attachments to know more.

I think this wraps it. As always, keep requests for features, bug reports and questions coming!

8 Likes

Thanks, for this useful upgrade.

1 Like

Very exiting :wink:

Just a note… I had to remove and add re-add the plugin for the “A PDF Model finished…” to appear in my Elements menu.

One more thing; is it possible to only save file to database and not trigger the file being opened/downloaded in the browser ? Scenario: generate/save file/trigger send S3 link in mail (no downloading of file triggered)

1 Like

Hmm, didn’t thought of that, but it’s perfectly possible, will add that soon.

Merely upgrading it didn’t solved it? Edit: I upgraded, it did not appeared, then pressed F5 then it appeared.

1 Like

Thanks @vini_brito for the plugin, very nice to work with!

Is it possible to save the PDF into the database as a PDF file which I can mail afterwords?

Thanks!

2 Likes