🚀[NEW PLUGIN] PDF creator + template builder

Hello fellow Bubblers!
We are glad to announce our small addition to the plugin collection:

PDF creator + template builder
Allows you to automatically create a document template (invoices, invitations, announcements, mailings, tickets, reports, certificates. etc.) from a page (or group) created by the regular tools of the Bubble editor. And then generate PDFs with dynamic data on the server or client side according to a predefined template.

On the client side: allows using a template with dynamic data to generate a PDF document, upload it to the server, get a link to the downloaded file and / or download the generated PDF file to the client computer.
On the server side: allows using a template with connected dynamic data without user intervention (for example, on a schedule) to generate a PDF document, upload it to the server, get a link to the uploaded file. For example, send invoices every month on a schedule. Or send invitations to users for a specific event. Etc.

The set includes elements:

  • PDF_creator - create PDF on the client side.
  • Create_PDF_action - create a PDF on the server side.
    Auxiliary elements:
  • Create_template - from a regular page created in Bubble, creates a template code for use in PDF_creator and Create_PDF_action.
  • PDF_code_editor - allows you to easily and visually edit (if necessary) the template code created by Create_template.

pdf_01

DEMO

jspdf_doc

jspdf_code + sandbox

Plugin page:

If you have questions, reach out to us at contact@mindforapps.com
We appreciate your reviews and suggestions.

Cheers
Jay | Mindforapps

1 Like

Hey @MindForApps

Does it work with multiple pages?

Hello!

In order to work with multiple pages, you need to create a template for each page separately. Generate code for each page separately.
Those. get a separate block of code for each page.

And then just combine these blocks using the line: doc.addPage();

How it works can be seen on our demo page:

An example is on the tab: Three pages
.

.

The examples on the demo pages are interactive. And you can try to change something yourself or paste it in the editor (left side with code) and you can immediately see the result (finished PDF) on the right.

In fact, everything is not so difficult.

If you have any questions please contact us and we will try to help you right away.

Thanks.
Good luck.

1 Like

Hello @MindForApps ,

But the multiple page is not static, I mean, it depends on how many line items are on the invoice.

Also, will it be possible to print the top section on every page?

Show the number of pages?

Is it possible?

Thanks a lot.

Hey!

Unfortunately, this cannot be done right now.

The plugin is designed to create a static template. That is, you get the template code and then the data is dynamically inserted into this code. And then generate a PDF.

You can create codes for several separate pages and then combine them into one common code. But still, this will allow you to change the dynamic data in the template, but not the size and layout of the elements.

1 Like

Hey!

Update version 1.2.0

Some changes have been made to the plugin code.
The “imageToBase64” module has been finalized and improved.
Image 24

Now it is possible to transform images directly before creating PDF. You can select image width and height, also you can select fit (contain,cover,fill,inside,outside) and position (centre,top,right,bottom,left)


.
.
.

More details can be found in the documentation:
in the section “Dynamic connection of images.”
Image 25

Image 26

.
.
.

You can also see a small demo of this function:

.

Good luck to all.

Hi, I’ve read through the documentation and although I’m sure if someone showed me how to do this, I’d be amazed at how simple it actually is, but as it stands I’m having a hard time understanding. Is it possible to very simply take the ID Attribute of an group/element and print that as PDF? It’s honestly a very simple use case and I’m sure this plugin is very capable of much more complexity, but as it stands right now my use case just calls for this simple function. Thanks,

Hello!

Well, in fact, the plugin store has a large selection of plugins that can cope with this simple task.
Our plugin is designed for more complex use cases.
In simple terms, you create a template for a future PDF document once, and then you can generate PDF documents by dynamically changing (substituting) data into the previously created template. Thus, it allows you to create PDF documents both normally and without user interaction using backand. Those. send mailings, invoices, invitations, etc., etc.

Hi!

Yes, I understand that your plugin is meant for much more complex things. I’ve tried many plugins from the store. Some don’t work well for my use case. The 1 I’ve found to work well is free and very simple and lacks some of the controls that your plugin offers. So I was just wondering if there was a way to easily use it for a simple element use case. I had purchased it many months ago so I own it but hadnt gotten around to playing with it. In any case, I understand, its likely overkill for the job.

Well, basically yes you can do it.
Perform the following steps in sequence:

  • Assign a group ID
  • Run the “Create_Template” process using your group ID and get the template code.
  • Pass the resulting code to the “Create_PDF” action and generate a PDF

But please check the documentation for the list of elements the plugin works with (text, group, etc.)

On our demo page, this is exactly how it works:

You can go to the editor and see the connection diagram in more detail.

Hi, I have this message :" plugin action create pdf action error when parsing the response : expexted a string but got a object (original data:{“message”:“Not found: fileupload”})" when I’m using the create_pdf_action from my mobile phone. When I’m doing the same action with the same button with my laptotp everything is ok.
Any suggestions to fix this ?
Thanks

Apparently “homeurl” is specified incorrectly. Please make sure that you have entered your application URL correctly.

For example, the application url (test version): https://pdf-creator-builder.bubbleapps.io/version-test

Image 11

So, in the “homeurl” field, you need to enter the url in the following form: https://pdf-creator-builder.bubbleapps.io/version-test
Those. you must specify the url of the application, and not the url of a specific page.
If you enter the url of a specific page in the “homeurl” field, and not the url of the application, for example: https://pdf-creator-builder.bubbleapps.io/version-test/my_page
the server will return the error you are writing about.

The fact is that the “/fileupload” endpoint is used to upload files to the server. Roughly speaking, this is a folder in your application on the server.
“homeurl/fileupload”
And when you specify the URL of a specific page: https://pdf-creator-builder.bubbleapps.io/version-test/my_page, the server tries to find “/fileupload” at this URL, but does not find anything and returns an error.

Please make sure that you have the correct url for your application in the “homeurl” field.