Hack for multi-page templates in Page Designer

Greetings,
I was wondering if a site like this might pop up after what I will pleasantly refer to as The Debacle. So glad it has, and great to see some familiar avatars! Thanks to all who are making this possible!

A client of mine recently ran into a classic Page Designer problem. I’ve made a boiled down version of it. Imagine we have an inventory consisting of items that are stored in boxes.

The goal is to produce a nicely-formatted printable Inventory of each box’s contents.
This is a cinch to do in the Page Designer… unless… you have more items in each box than can fit in a single column on the page.

Our base is set up as follows:

  • Item table (canoncial name of each item, and any relevant metadata)
  • Boxes table (name of each box and relevant metadata, like the box’s location)
  • Inventory Lines table (relates a box, item and quantity together)

And here’s a basic example of a Design for a box label that lists the contents:

But when a box has a long list of contents, the table just gets truncated! (in this example there are two more rows than fit on the page):

So here’s the trick:
Page Designer allows you to position elements off of the canvas, and it uses a precise absolute pixel-positioning system. We created a second Page Designer template for “Page Two” where the Table-type element has been made much taller, and then positioned so that most of the table is off the top of the page. Then an empty text container with a white background is positioned to create a clean margin at the top of the page:

And here’s what it looks like in the editor:

Hope this is useful for others who might need to have multi-page templates!

3 Likes

Hahaha, The Debacle!! :rofl: I love that!! :joy_cat:

Great to have you here, @NathanielGranor!

And wow, thanks so much for posting this very clever Page Designer trick, along with all the helpful screenshots! I’ve never thought about doing it this way before! This is very very cool, and it solves a serious pain point!

What I especially love is that you get to create a header for the 2nd page, so the 2nd page still looks just as classy as the first page!

I bet that this will be a very useful tip for many people in the future who read this!

Question 1: Do you use any methodology to remind people that there are more lines items to print than what will squeeze into page 1, so they are reminded to go to the 2nd page to print it?

Question 2: There’s a much INFERIOR way of doing this, although I’ve never actually tested it out myself. I was curious if you ever tried the inferior technique of making the length of Page Designer’s “single page” very very long (in pixels)? And then, when printing, choose a “normal paper size” for printing? That would actually FORCE Airtable to print onto multiple pages, but… (1) you have no ability to specify a header on the subsequent pages, and (2) I’m not sure how cleanly Airtable would break a linked record field across multiple page breaks. I’m curious about how bad it looks in the end… have you gone down this path at all?

1 Like

Short answer: no never tried it that way.

The client in question has a small team, so everyone is in the know about it, and we haven’t found it necessary yet. But if I did need to do that, here’s what I’d suggest:

  1. Based on your design, you should be able to calculate how many table rows fit on each page
  2. Use a count field in your underlying table (the Boxes table in my example) to count how many linked rows exist for the box
  3. Create a formula field that can calculate a “# Pages Needed” value for each Box. The design in my example can fit 15 rows* so the math here would be CEILING({NumLines)}/15)
  4. Edit the Page Design for the first page and add a Text element that says “Page 1 / {# Pages Needed}”

Using the same logic as above (and we did do this with my client), you can also create views that filter the Boxes down to only records that require a page 2 (or page 3, or page n). That way you can print all the records that view (rather than printing a bunch of blank templates for records that only require one page, or having to print them one by one).

*In my quick template design above, I created a situation that actually DOESN’T work reliably. You must ensure that your table rows are always a fixed height - i.e. each row of the table must be the same number of text rows. If you don’t do that, you may end up with missing/duplicate rows on page 2, 3 … n.

1 Like

Thanks for the extra thoughts, ideas, and clarification on this!