Bubble is not rendering pages fast enough for Api2Pdf service

I am using Api2Pdf for creating printable pdf’s.

The problem is that Bubble is not rendering certain pages fast enough, so I end up with blank elements every so often. The pages most affected are the ones with the most elements (100+).

Suggestions to fix the problem?

Capacity boost?
Change a setting in the API?

1 Like

A 2 unit capacity boost seemed to improve, but not solve, the problem.

I suggest you to try this:
https://www.convertapi.com/web-to-pdf

You can add a delay. So this will let time to page to load (up to 30sec)

Hi @Jici. This stuff is new to me. I looked through the site you posted but couldn’t see a way to add a delay. Could you point me in the right direction?

It would increase your cost way too much… did you try scheduling the workflow after the page has loaded completely? Maybe doing that and adding some seconds to current time in the workflow is a option.

Thanks, I’m going to try this.

Check in Web rendering Parameters section. ConversionDelay

@Jici Thanks. I didn’t see it before because I was looking under Chrome. This works, apparently, with Chromium only?? Hmmm.

@3brotherssupply The workflow is printing other pages (not the page that the user is on…which is fully loaded). Not sure how to do this from the bubble side. It would seem that this would need to be done in the API parameters.

No. This is the engine used to create the PDF. In your other link, you have different options like chromium,wkhtml… they are just different script that create PDF from html

1 Like

I’m using the api as well… if you use the chrome option, you are creating the pdf without rendering it first… meaning it can be done serverside or client side… wkhtml creates the pdf client side based on what you render on the screen… this may cause issues though if the screen size isnt the same size as the pdf page. My reason for using api2pdf aside from price was to produce pdf’s without rendering it first

1 Like

Do you have any tips on how to render PDF’s server side using these API’s but authenticating as a user so we can also use privacy rules properly?

The only way to apply privacy rules is by getting an access token using email and password As a User | Bubble Docs

I guess it doesn’t apply for you case

What you could do is to, instead of using a page to pdf, create a real PDF by sending the data to the third party service to generate the PDF.

I like to use make + word template (and if needed, cloudconvert to get a PDF)
Often, PDF look better using this VS page to pdf.

https://share.zight.com/4gu8oADv