Reputation: 173
I'm generating a Microsoft Word document from PHP with PHPWord. I need to set the edge of each page with the traditional box mode like this example, but I can not find anything about this in the official PhpWord documentation. Is there a simple way to do this using the PhpWord API?
Upvotes: 2
Views: 754
Reputation: 173
It's as simple as setting the style of a section and adding content:
Example:
$style = [
'borderBottomSize' => 1,
'borderLeftSize' => 1,
'borderRightSize' => 1,
'borderTopSize' => 1
];
$section = $word->addSection($style);
Upvotes: 2