Forum


Replies: 3   Views: 318
Remove left and right margins in header / footer
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

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.