What plugin are we really missing?

But couldn’t a cloud service be created that returns a PDF via an API call? Seems like there’s value to creating that API, no?

I don’t think it would be as popular as an internal solution. The problem with the APIs is trust, what if the developer goes out of business? Internal code will still work and you can control when to update, but external can just stop working at an unannounced time.

2 Likes

The real solution here is Bubble allowing us to use Puppeteer. I’m curious if the limitation is a software / hardware one or was it just a decision that was once made.

I might contact support about this

5 Likes

Hey @lindsay_knowcode !

Great to hear!

Thanks for sharing and for the kind wishes. All well here! :smiley:

Just wanted to share that I contacted support, and asked for the ability to npm require Puppeteer. Hopefully that helps, fingers crossed. If you are reading this and also want this feature, contact support! :slight_smile:

2 Likes

Thank you @jonah.deleseleuc for looking into this. I was contacted by Bubble engineers maybe a year or so ago to get my input on their PDF project (that has since been put on indefinite hold).

I have tried every PDF plugin, and currently use DocMaker, which works ok. It uses an API and relies on a Word template. Conjurer is way too complicated for anything beyond a single page like an invoice or something.

This is definitely a hard one, else Bubble or someone else would have already solved it. That’s why $20-$50 seems way too low IMHO. With DocMaker, I’m paying $12/month for 500 API calls.

The real game-changer would be to have something that worked according to WYSIWYG principles. Maybe some internal templated page layout that users could copy and modify such that it would print out exactly how it looks. Perhaps multiple templates based on the desired page size and orientation. Not sure if this is even possible, but it would be very popular if you could pull it off.

4 Likes

First of all, you’re welcome! :slight_smile:

But the real solution is using Puppeteer. Pretty much every source says that the best way to convert a webpage to a PDF inside a node environment is by scraping the URLs that you provide, and using the default window.print() that every browser supports (CTRL + P).

It’s fast, efficient and produces the desired results in under 20 lines of code (on the plugin side)

It’s admirable that many people are creating workarounds using templates, but those plugins are at risk of becoming out of date someday if Bubble makes drastic changes to the way its pages are structured. Furthermore, Puppeteer - no matter how the page is created works every single time and will probably have continued support for a very long time since it was produced by Google.

The only solution I can think of is by using the package ‘puppeteer-core’ which is small enough to run in our server environment. According to the puppeteer docs…

… you should use puppeteer-core if

  • you’re building another end-user product or library atop of DevTools protocol. For example, one might build a PDF generator using puppeteer-core and write a custom install.js script that downloads headless_shell instead of Chromium to save disk space.

So there is a way, technically, but I for one am not skilled enough to create a custom install.js script that downloads headless_shell .

If someone can create it that way then all power to them! :slight_smile: But even if they could, it’s still a waste of time to have to do all of that…

Anyways, that’s what I’ve understood so far :slight_smile: I hope it helps someone more skilled than I

3 Likes

@jonah.deleseleuc For what its worth I would pay you $100 right now if you can produce a plugin that imports docx files while maintaining styling into any rich text editor (for users to edit) and which then lets you export the text from the bubble plugin back into docx while maintaining styling. At the docs upload stage it also needs to retrieve the wordcount.

2 Likes

Hi everyone, as @lindsay_knowcode said in the other post above, I connected Bubble to Google Docs to generate PDFs, and it worked fine, but I faced some problems when relying on Google docs API, for example, we can’t build a chart inside the doc and then fill it with data from an API call, we can’t add a watermark dynamically, also, dealing with tables is terrible and I have some clients with complex pdf needs. So I decided to study other ways to generate PDF and now I’m working on another solution for PDF creation, I like the way PDF Conjurer generates PDF because it is light and accurate, in other words, the document you’re creating is the pdf itself, not a text document or page that will be converted to PDF. But, the problem with PDF conjurer is that it makes creation too abstract, then I came up with a solution which is creating a nocode tool to build pdf templates (in this case the template is actually a pdf) and then fill the pdf template with dynamic data. The tool’s engine will translate the nocode language to a javascript library for PDFs. The benefits are:

  • you’ll be editing a PDF when creating a template, so what you see will be the same as what you will get
  • it will be fast, as PDF Conjurer is
  • you’ll see the result instantly, like editing a post here on the forum
  • it will work on both client and server side
  • there’re lots of cool things that can be implemented, like creating a chart template and fill it with dynamic data, etc

Unfortunally, as this is a side project, it’ll take some time to have a beta version, however, you can see an exemple of the tool’s interface on the image below.

10 Likes

@jizreel_alencar I like this approach…the no-code template builder.

What would it take to accelerate this project?
In the past, others have used crowdfunding/early lifetime licenses to do this.

1 Like

In the meantime, I’m working on a way to get the web-scraping method to work, either using Puppeteer or some other service. I’ll update when I’ve got a working prototype

3 Likes

I’m building my first bubble app. One of the tricky spots I am approaching now is in relation to a forum post I made on searching strings.

For example that I have a table of roughly 10k cryptocurrencies. I want to allow people to start typing into an input field: “Bitcoi” and it would lookup project names to help them autocomplete the field. Then ideally, it would allow them to bind another one, like tags ( multiselect list )

In another use case, I wanted to bind this type of system to a drop down. ( single item relationship )

In both cases, I want to create a relationship with the item, not the project name field

I found a plugin that seems to be ready to help but it indicates it is no longer maintained. Also I have found this plugin referenced in several tutorials now. Just an idea of place to take a look at. I have not tested it yet, still looking for options. This is the only one found so far.

1 Like

I’m finishing up a client’s project and then I’ll have more time to work on the pdf generator, I’ll probably have something to show in a few months. Anyway, thanks for the suggestions.

3 Likes

I got selectPDF to work well and I like they support running as a user so you can keep the data privacy rules. I have clean page-breaks and everything to do a multi page invoice but the only down side is the monthly charge for selectPDF API. All we need in an in-house Bubble version of SelecPDFs service.

1 Like

We need a “diff view” plugin to easily compare the changes made across branches/versions. plleasseee make this.

No support for dynamic page breaks. You need to know specifically where they are, such as a static invoice template, but not much more

2 Likes

I’ve got something for you, but it has some caveats. What I’ve got working:

  • Can be created with backend workflows

  • Very fast, I created a pdf in under 3 seconds

  • PDFs look perfect every time

The only caveat is, that this solution only supports a limited amount of requests a day. This plugin would cost no more than 15 dollars. No API Key, no setup, but you can only throw it 50 jobs / day. If you want more than that, then you’ll have to create an account with an API service (however, it’s really, really inexpensive)

How does this sound? It’s a compromise, but given the current state of the 50mb limit I believe it’s the best I can do (so far!)

All the best,

2 Likes

Hmm. It seems like it is using an API still?

1 Like

Can you implement page breaks easily?
How would you create the layout? … I guess it reads the url right?
Do you see possible that sending fields to the service via the plugin and building the layout on the service … things could work?

Even if it is an API … free and later paid as volume grows it would be useful

2 Likes

For now yes, but the service is free up to a point. In the meantime I’m trying to develop a solution with puppeteer-core

2 Likes