Hello,
You can set custom values using modifyPageLayout (https://www.phpdocx.com/api-documentation/layout-and-general/modify-Word-page-layout-with-PHP): width, height, marginTop... You need to apply custom as paperType. Other paper sizes are preset values of these options.
Or you can use a DOCX template.
Regards.