Page Number Does Not Display Total Pages When Generating PDF with Chrome Library

When using a Print Format to generate a PDF with the Chrome library, the page number can display the current page, but the total number of pages is not shown. For example, the format Page 1 of 5 does not display the total page count correctly.

I would like to know if there is any configuration or recommended approach to display the total number of pages when generating a PDF using Chrome, or if this is a limitation of the Chrome PDF generation library.