Services Plugins FAQs

Page Break Help Please, Thanks in Advance! :)

Hello all,

I am new to this forum. I bought the Bubble Page to PDF plugin a while ago and still have not been able to figure out how to cleanly make a page break. I need some help understanding how to do this.

Here is how i have it set up so far. I have a full page set up with a repeating group and a “Header” that should only show at the top of the page. I have not yet been able to make a clean page where the header is at the top. While looking at the example it seems like they kind of “cut up” the repeating group in chunks and display only 10 at a time or something like that. I don’t understand the math behind it i guess and maybe need someone to explain it to me in simple english terms.

This is what i have currently:

(I had to delete this image because the forum won’t let me post more than one picture since i just joined)

This is the result:

My program makes a schedule that can be printed. For my needs i only need to show 2 weeks of the schedule per page, the first top of the page is the 1st week schedule and the bottom of the page needs to be the 2nd week schedule. The problem is that the user can select as many weeks as they want to print. Could be 5 weeks, 8 weeks, 9 weeks, any amount. They need to be displayed nicely though with a nice header on each page.

The example in the Zeroqode tells me to do these functions that i do not understand. I know this seems easy for some but i get a headache trying to read this, i just can’t comprehend it fully… any help would be appreciated. Can someone explain this to me more:

First, we need to set custom input (You can use states, or any other method, we used input in the example, to make it more accessible/visible)
As we want to display only those pages that hold reports, and avoid generating empty pages, we use this input to calculate how many rows will have our master repeating group following the next rule:

Search for pdf_demo_datas:count / 10:ceiling
Then we settled the master repeating group, so it shows only number of rows as specified in previous input, following next rule:

Search for pdf_demos:items until #Input pages’s value:items until #Input pages’s value
Each of these rows will display our promo materials (images, text and so), but it also contains referral input deciding current page in PDF editor and also the starting item to display in inner repeating group:

Current cell’s index * 10 - 9
The final report will display only rows 10 rows from report data, starting from the value decided by previous input.

Search for pdf_demo_datas:items from #Input with index’s value:items until #10

Is this duplicated for a reason? It looks like it says “items until #input page’s value” is there twice. Is there a reason for this?

Hi thank you for reaching us out.
To get to all your questions:

Search for pdf_demos:items until #Input pages’s value:items until #Input pages’s value

You are right here. It’s duplicated by mistake. But it has no affection as it says items until 4 and than it repeats again items until 4.

As we want to display only those pages that hold reports, and avoid generating empty pages, we use this input to calculate how many rows will have our master repeating group following the next rule:

The maths behind is simple. And all it depends how many items you want on each page to be displayed (based on the space it requires). In our case we shows 10 items on each page so we simply take the number of all items in report pdf_demo_datas:count and divide it by number of items per page (rounded up).

Then we settled the master repeating group, so it shows only number of rows as specified in previous input, following next rule:
Search for pdf_demos:items until #Input pages’s value:items until #Input pages’s value

This tells the repeating group to show only four pages (as we have 36 items in our report).

Current cell’s index * 10 - 9

To display on each page proper report (the right number of items starting from the right item), we need an helper (input data holder), where we simply store the current page -> starting index to display.

The final report will display only rows 10 rows from report data, starting from the value decided by previous input.
Search for pdf_demo_datas:items from #Input with index’s value:items until #10

As we established on the beginning, that we want to display 10 items on each page, the above refers to the closest input (our data holder), and takes items from/ items to as we needs.

firstly you should set the cell of master repeating group as close as possible to the pixel size of generated pdf page, and the page break place on the very bottom of this master cell.

Hope this did help.
In any case, let me know it you will need any closer explanation.

Regards,
Karel

1 Like

Thanks for the explanations, it does help a little bit. I am trying to understand how i am going to make it work for my situation though.

If i have a list of schedules (each one week) and i need to display 2 weeks per page, how do you suggest i do that?

Can you point me in the right direction? Thanks so much.

Hi Jay, if it’s a repeating group you can limit the number of items you want to show in that repeating group, then paste a page break and repeat. Or alternatively you can have a repeating group within a repeating group. I’d suggest you experiment with that
thanks

Yes, i am trying to do a repeating group within a repeating group. I can’t get it to show more than just 1 page for some reason. I just can’t figure out the logic.

Ok. I don’t think I finally figured it out. Phew :sweat_smile:
My schedule prints two weeks at a time now.

Thanks for all the documentation. It really is worth putting together for us who are still learning all this. Thanks @levon for your teams help.

Awesome, Jay! really glad it worked out for you :sweat_smile:

maybe you could post a few screenshots of how you setup your page so others could benefit from it as well? (of course if there is no confidential info on the page). thanks!

I will see if I can do that. If it could help others benefit from your plug in then why not? You have been helpful to me so the least I can do is be helpful to others as well.

This is how it worked for me:

I hope this can help someone else trying to do the same thing.

Thanks a lot @jay this is awesome!

Hi @jay, @karel and @levon
I have a similar but different issue to Jay and wondering if you can help. After reviewing the documentation, the demo and the great explanation by Karel I understand all the logic behind it all. I note the in the demo though that the text is cut off if the element is not big enough.
The pdf page I want to create is an unknown number of journal entries. Each journal entry has some text of an unknown length (that I do not want to cut off), and an unknown number of journal photos. This means that not all photos may fit on the page and may flow onto a 2nd page
I am guessing from the feedback above I need to have a repeating group of journal photos within a repeating group of journals within the 1 x 1 full list repeating group that is the page itself.
Any suggestion on how this might be achieved given the photos and or text (depending on layout) may go to a 2nd page for each journal entry?

If anyone else has this issue I worked out a solution. I made the main repeating group that is the page twice a high (224 instead of 1120). I them created two groups within this repeating group, the second one an exact replica of the first but immediately below the first. The second group (which is the 2nd page) is only visible when either the length of the text is longer than will fit in the first group (or page) or the number of photos is greater than the number of photos in the first page. Works great.

2 Likes