Pages getting cut off
This article discusses creating PDFs in Bubble applications (using the 'Create PDF' plugin action). If you wish to create PDFs based on a template you have designed in our template editor, please see other sections of the documentation.
You can watch a video tutorial on this subject here.
If you're using page breaks, smart breaks or starting each cell of a repeating group on a new page, you may encounter instances where the bottom of one of your PDF pages seems to get cut off.
For example, the below target PDF page has a top-level repeating group where the data source is 'Location' and a nested repeating group where the data source is 'Building' (each Location has a number of Buildings):

Here's how the target page looks in run-mode:

In the 'Create PDF' action we've added:
- An ID attribute for the top-level Location repeating group to the 'New Page Per Cell' field
- This forces each cell of the top-level repeating group to start on a new page
- An ID attribute for the Group within the nested Building repeating group to the Smart Breaks field
- This forces the group onto a new page only if it would otherwise be split across pages

Here is the output PDF:

But there's an issue with one of the buildings within the nested repeating group:

The solution to this is to add a custom HTML element anywhere on the page (you can set it to 1px by 1px) but the 'This item is visible on page load checkbox must be checked).
Add the following code to the HTML element:
<style>
#id-attribute-of-group-getting-cut-off {
display: block! important;
}
</style>
In our example, we're going to add this code to the HTML element:

as it's the group within the nested repeating group that's getting cut off and we've already added the 'smart-break' ID attribute to it.
Here's how the PDF looks after adding the HTML element - the group is no longer getting cut off:

Important: You may need to experiment with which specific group (or repeating group) you apply the custom HTML to. The exact group that's getting cut off will depend on your specific setup.