Forum


Replies: 3   Views: 74
Remove left and right margins in header / footer

Posted by admin  · 17-04-2025 - 17:03

Hello,

What version and license of phpdocx are you using?

Your username doesn't have a license. Please send to contact[at]phpdocx.com the username or email address of the user that purchased the license you are using.

There are the following approaches to accomplish the requested task:

  • Setting custom header and footer margins and contents with custom indentations.
  • Adding floating images or tables.
  • Use custom templates.

Also, please note that modifyPageLayout includes the following options to set margins: marginTop, marginRight, marginBottom, marginLeft, marginHeader, and marginFooter as detailed on the API documentation page (https://www.phpdocx.com/api-documentation/layout-and-general/modify-Word-page-layout-with-PHP). In your code, you are using: headerMargin, topMargin,... that aren't correct.

Please send the information about the license you are using to contact[at]phpdocx.com.

Regards.