Hello,
Using the following method of DOCXPath:
https://www.phpdocx.com/api-documentation/docx-path/get-docx-path-query-info
You can query by section an get its information from the tag w:pgMar of the elements key of the returned array. Please check the included samples to understand how to use this method.
Regards.