Forum


Replies: 4   Views: 2909
Change page layout dynamic?
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 marcushjortsberg  · 09-03-2013 - 18:30

I have some info that I want to put in a document.
Some info I want to be structured in 3 columns and some info should be in 1 column.

How do I change the page layout in the document?

Like

page1
column1|column2|column3

page2
column1

Posted by admin  · 11-04-2013 - 12:13

Hello,

You can use modifyPageLayout method to change page layout, paper type, number of columns, margins and other.

Regards.

Posted by marcushjortsberg  · 11-04-2013 - 12:13

Ok,

so in pseudo code

addsometext
modifypagelayout (A4, normal, no margins)
addsomenewtext
modifypagelayout (A4, landscape, margins)

??

The modifypagelayout should come after the added text? And is valid until I change the layout again?
And I can change the pagelayout ad many times I want?

I have gotten some errors when tampering with these settings...
Something goes wrong sometimes, sometimes I get some fatal errors and the document won't open:(

Posted by admin  · 11-04-2013 - 12:13

Hello,

Please check easy/ModifyPageLayout.inc, intermediate/HeaderAndFooter.php and intermediate/EmbedExternalHTML.php examples

If you find issues paste your code to test it.

Regards.