Replies: 5   Views: 3466
Landscape mode
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 seb  · 11-04-2013 - 12:13

I'm also finding the document parameters do not work, for example:

$docx = new CreateDocx();

$docx->addText("Hello world!");

'orient' => 'landscape',
'top' => 1000,
'bottom' => 1000,
'left' => 2000,
'right' => 2000

None of the above parameters have any effect on the resulting document. Is this an issue or am I missing something here?

Having looked at the XML output, I can see now that there is definitely an issue here.

[b]PHPDOCX output:[/b]
[code]<w:pgSz w:w="11906" w:h="16838" w:orient="landscape" w:code="9"/>[/code]

[b]MS Word output (created a blank landscape document):[/b]
[code]<w:pgSz w:w="16838" w:h="11906" w:orient="landscape"/>[/code]

Looks like the orientation is coming through, but the page width and height are still A4-Portrait - why is this?

Many thanks for your help,