If a page has an empty HTML element with the following style: display: flex; gap: xxpx;(xx is any positive integer), it causes any printing of the page to be tens of thousands of pages long. Reproducible on this page: https://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost/2022-10-31/From_the_team. Reproducible both with Google Chrome's print function (Control/Cmd + P) and with https://en.wikipedia.org/api/rest_v1/page/pdf/Wikipedia%3AWikipedia%20Signpost%2F2022-10-31%2FFrom%20the%20team.
Seems to be due to https://bugs.chromium.org/p/chromium/issues/detail?id=1161709, meaning this issue has existed since Chrome v89. Potential fix incoming at Chrome 108 per the crbug link.
Part of T314281.