Need help with pdfgeneratorapi. Quickly. Will pay

Hello,

I need help with setting up a report with pdfgeneratorapi. I’m not api-fluent and I need this sooner than I can figure it out enough to develop on my own.

Is anyone interested in helping with this?

Thanks,
George

1 Like

Hi,

You can use SelectPDF from Bubble. It’s free. Let me know if you need help explaining how it works. I can also set it up for you if you send me a message with your requirements.

1 Like

I’ve recently done two things with pdf APIs. I’ve merged PDFs together, and I’ve also created a pdf from a URL.

Please explain exactly what you are trying to do and I’ll do my best to help.

Hi @troy.roberge

If it’s going to be done from a url, the page would be set up with a repeating group that looks like a grid. I’m not sure that can be achieved that way though. That’s why I was looking into something like pdfgeneratorapi. But I don’t know, so that’s why I’m asking.

Ultimately what I need is something like shown below, except without the cell highlighting shown in yellow. I don’t need it grouped as shown, just the grid with logo and title at the top. These will have dynamic number of rows, and the page breaks need to break cleanly. Page size is 11x17.

Thanks,
George

Hello @gnelson

Here is the API setup for sending a URL to API2PDF.com. You will need to set up an account on the website and get an API Key. It’s very easy to do.

You need to set this up in the API Connector Plugin.

On the page I am using, I have a workflow that sends the page to the API once the image is clicked (just to test the function, this won’t be the final design). But basically any button can run this.

Step 1 runs the API.

Step 2 downloads the PDF that was generated.
image

These two pages are what is generated (I added a garbage RG just to have it run into a second page) (sorry for the redaction). I set the page dimensions to what works to ensure a “letter” sized page. The width is 855 (letter size). You will have to test it for 11x17, but it should be double.


I think pretty much everything is covered here, but if you have any questions, please let me know.

3 Likes

Thanks for all that. I’m away from my computer, but will play around with this when I get back and let you know how it went.

Thanks,
George

Hello @troyr,

I followed your instructions and did generate a pdf, but ended up with a two-page document with the second page empty. Based on what is shown on page one it would actually be a three to four page long document. Is there some other setting I need to use?

Update: I had the page set for portrait. I tried a few things while troubleshooting, and discovered two things. 1. Changing to landscape, for whatever reason, did put data onto page two, but it still only showed the same number of rows. So that got me to thinking… 2. I needed to change the RG settings to Full List. That did the trick.

The results are actually very clean. And I can’t believe the pricing of this platform. Crazy cheap!

Also, for others that may find this post helpful, be aware that step 2, Open a URL in a tab, requires the free plugin URL actions. Took me a few minutes to figure that out. LOL

Thanks again @troyr for your help! The amount of help I’ve received in this forum has been unbelievable. Hopefully some day I’ll know this well enough to pay it back!

George

Oh lol, yes i forgot about that plugin. That being said, you might not need to do it that way. It was simply the first way I tried and it worked. It took me a damn long time to find a good api that was very very cheap. Most are quite expensive.

1 Like

Hi @troy.roberge and @troyr,

After further use I’ve noticed that not all data gets printed. It will print every row, but will have data missing in some of the cells. It also never “breaks” on the same row. Sometimes I get more data than at others. I’m going to submit a ticket with them, but in the meantime I thought I’d post here in case you may have an idea the cause. It’s a five page document, and usually starts missing data around page two or three.

Thanks,
George

Interesting, I have only used this for a small repeating group on a single page.

I have some crazy cleaning and errands to do tonight (xmas hell!). But I’ll try to reproduce with lots of RGs.

There are other API systems that have a “delay xxx seconds”, but they are way more expensive (50x more).

The only other idea i have while not doing testing, is to speed up the RGs. I’ve considered using algolia, but I haven’t worked on that yet. It would allow your page to load almost immediately. But it’s more work and more external APIs.

Let me know if you figure out anything, and I’ll do the same.

1 Like

Took 25 minutes to get a reply…on a Saturday. Impressive!

Here’s what they had to say.

Hello, what is most likely happening is that your css or tables are taking too long to render. Either you have some complicated JavaScript or css is in such a way that the snapshot the PDF takes of your html is happening before the data has time to appear in the tables.

That’s all we can guess from the limited information we have.

If we are correct, you should consider having the page render all info without any JavaScript. Pdf rendering does not mesh well with JS.

Yeah, you might need to use a plug-in instead, or use a different api company.

Could you ask them if there is a way to delay rendering for a few seconds, or if that is something they are going to implement?

@gnelson

I just had another idea. Would it be acceptable to load your page in another tab, and after the RG is fully loaded, then you run the API automatically? It might not look perfect, but it would work.

Here’s another response from them. There customer service is very good.

Ah yes, look at how the page renders: https://s3.amazonaws.com/vo-random/ShareX/2019/12/2019-12-21_19-46-50.mp4 – you can see how portions of the data renders faster than others, so my original theory is correct. The PDF is taking a snapshot of the page prior to the complete rendering.

Since bubble is a platform, I’m not sure how much flexibility you have, probably none in how this page populates. So unfortunately, I’m not sure there is a viable solution given the technical limitations.

I tried our competitors – pdfshift.io, paperplane.app, and pdfcrowd.com and they do an even worse job than we do at the rendering.

Actually, I have an idea, we have an internal build in alpha state that is designed to provide support for situations like this. It still may not work due to the way bubble is outputting the content, but I’ll do some testing and let you know.

Here’s the followup to that effort:

No-go. Found a thread on bubble’s forum discussing this very issue: Page and all elements completely loaded - seems like some guy went all out to come up with workarounds and still might not work. Very complicated.

Well, I’m already letting the page fully load. I think they explain the issue in their last couple of responses that I just posted on here. Maybe the angolia strategy will allow the page to load fast enough for their api to work?

I know there’s a way to accomplish this because the plugin Advanced Grid works great, except I experience the following issue. [NEW PLUGIN] Advanced Grid I haven’t received a response from @MindForApps yet. Maybe they can help solve this.

This is pretty frustrating for me because in my line of work, and my customer base, documents like this are very common and needed.

Thanks again for all your help.

George

Well there is always plugins that render it client side. How long does it typically take for your page to load? Is there any optimizations possible on the search?

You can use convertapi.com
It allows you to delay the render to give you time to load the page. But it costs way more. But you can test it with their trial.

Let me know if there is more to this story!

Well, of course it depends on how many rows the user wants to view, but currently around 18 seconds for 130 rows. I’m only on the personal plan with no extra credits for this app until it goes into production. Not sure whether upgrading would solve this issue or not.

I sent them a support ticket to specifically ask if they can build in the conversion delay. I’ll let you know what they say. It should be easy to implement, and it would be beneficial to their offering.

You sent a ticket to api2pdf?

I tried convertapi and got it to work. No data at all without delay. Still no data at 10 second, so I tried at the maximum of 30 seconds, and got everything. So yeah, you’re right. Makes sense. $30/mo is doable, but I like api2pdf pricing much better.

Looking forward to finding out the response you get.

Thanks,
George

Yes I sent it to apipdf.

I spent about 10 hours between my pdf merging requirement and rendering requirement. I tried 4 different companies. Convertapi worked but was rather expensive but full featured.

I’ll let you know what i hear.

1 Like