Replies: 2   Views: 3354
Docxsetting - zoom setting
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 Sven May  · 04-04-2016 - 11:20


What I want: if user open the generated document it open in 110% zoom.
I found this topic:
...but it not work for me...

The different how I generate my document and example write it that I use template, generate TOC and make a 'new' document with MultiMerge();

Is it possible that the merge override or hide my general word settigns?
My code:

$docx = new CreateDocxFromTemplate($template);

$docx->addText('Table of Contents', array('pStyle'=>'TocStyle'));
$docx->addTableContents(array('autoUpdate'=>true), array('pStyle'=>'AutomaticTable2'));

$docxSettings = array('zoom'=>110);

$merge = new MultiMerge();

$docx = new CreateDocxFromTemplate(<mergedDocx>);
$docxSettings = array('zoom'=>110);

Insert this code above createDocx() function.

Posted by admin  · 05-04-2016 - 06:26


Sorry but the current version of phpdocx doesn't allow to change already existing properties, just set properties for new documents.

We're going to add a task to consider adding this new feature. If you're interested on a custom dev please purchase a pack of tickets and open a new ticket.


Posted by Sven May  · 05-04-2016 - 07:09

Thanks for the answer! :)