[Ultimate PDF] Using page break inside web blocks not working

Forge Component
(11)
Published on 3 Dec (5 days ago) by Ricardo Costa
11 votes
Published on 3 Dec (5 days ago) by Ricardo Costa

Hello guys,

So I am trying to use a page break within a web block.

While that works if it is used in a web block used in a web page, it doesn't work If I used a web block inside another web block.

In my specific use case, I have a lot of encapsulation going on, Web page -> Web Block -> Web Block -> Web block -> Web block

Is there a work around for that page break to work there?


Best Regards,

Jose Torrao

Solution

Hello Guys,

So no one answered me, but I did find the solution (and in case someone needs in the future).

So apparently this extension uses chromium print to pdf to create the pdfs.
After searching for a bit, I learned that this feature doesn't detect page-breaks under certain css rules.

The problem I was having happened because I had a container with display: inline-block.

This came from a container that had it's width set to 11 col (which uses a style that has display: inline-block). When I set that container to fill width, the page-break just worked.

So guys, if you plan on using page breaks inside something, don't set it or the parent divs to have 11 cols.

Best regards,
Jose Torrao

Solution

Hi José. I'm glad you found out what the problem was.

I had this on my list to get back to you, hopefully during next week I'll spend some time updating this component and documenting it.

Thanks for your troubleshooting and also thanks for sharing the solution. Great job!