Quantcast
Channel: PHPWord
Viewing all articles
Browse latest Browse all 450

Created Unassigned: PageSizeH and PageSizeW don't work in github version [81]

$
0
0


Hello,
I have custom sized paper I need to dynamically create in PHP and while this worked in the old .6 version, it no longer works with the github version. Am I doing something wrong?
```

$twips = 1440;
$width = $width * $twips;
$height = $height * $twips;
$marginTop = $marginTop * $twips;
$marginLeft = $marginLeft * $twips;
$marginRight = $marginRight * $twips;
$marginBottom = $marginBottom * $twips;

// New Word Document
$PHPWord = new \PhpOffice\PhpWord\PhpWord();

// New portrait section
$section = $PHPWord->addSection(array(
'pageSizeW' => $width,
'pageSizeH' => $height,
'marginTop' => $marginTop,
'marginRight' => $marginRight,
'marginLeft' => $marginLeft,
'marginBottom' => $marginBottom));

```
The page size always is now coming out as A4 even though I am trying my own custom sizes. Any help would be appreciated.

Thanks,
David


Viewing all articles
Browse latest Browse all 450

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>