PDF Setup with SelectPDF API

Hi,

I am really struggling with setting up a PDF using SelectPDF. I read what we have on the Forum but i am still lost. I have it set up to print out from a webpage that i set up. Most of the time it is “Good Enough” but has weird spacing. Is there a way to set up page breaks? How do i get a clean PDF without odd spacing at the top of each page? I can’t figure out how it works and what makes it space correctly.

Also, how do i open the PDF in a new tab? Right now it just opens it in the current tab making it awkward to “go back” to the previous page.

Any help please!? Thank you in advance.

Welcome to the wonderful world of SelectPDF!

Sorry to say, but it has taken me countless hours to get the prints just right and every time I thought I had the page sizes down, it proved different again for other print pages I have set up. I also compared my A4 page dimensions with others on the forum and they always differ so I’m afraid it’s a lot of trial and error. Luckily, the Bubble team added a couple of good options like ‘Keep images together’, but it is still frustrating. Just try to make everything as static as you can… (although all my print pages are fixed width AND responsive rendering enabled)

The spacing on top and bottom of the page you can control by setting the margin, that is actually very helpful.

1 Like

How do you add page breaks?
Just a HTML element with the HTML code from selectPDF?

1 Like

Hey @pivoteye

You can try this post: Page Break Help Please, Thanks in Advance! :) - #11 by jay - Plugins - Zeroqode Forum

Basically there is a repeating group inside a repeating group. The main repeating group is the size of the whole page, the inside repeating group stops at a certain number so it doesn’t go to the next page.

For example, items 1-10 are on page 1. Items 11-20 are on page 2. Items 21-30 are on page 3. Etc.

It’s not perfect, but it works well enough for a lot of situations. Otherwise, you can use the PDF Conjurer that creates clean page breaks without creating an actual page that it converts. Just sort of difficult to set up and hard to make it look ‘pretty’ design-wise.

I’m still waiting on Bubble to release their new PDF creator that hopefully is easier to use and hopefully handles page breaks well.

Does that make sense?

Hope that helps! :blush:

@j805 www.NoCodeMinute.com

For All Your No-Code Education Needs:

1 Like