Forum


Replies: 20   Views: 10708
Greek and hebrew
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 admin  · 15-12-2015 - 17:09

Hello,

Some styles from PHPDOCX can't be overwriten using the method importStyles due to compatibility when adding some special content. This should be the problem you have found.

To overwrite all styles we recommend you to use your own template using the CreateDocxFromTemplate class instead of create the document from scratch (you can use an empty template and add content to it) overwritting the styles you don't want and/or set your base template when you instanciate CreateDocx; this is the signature of the constructor:

/**
     * Construct
     *
     * @access public
     * @param string $baseTemplatePath. Optional, basicTemplate.docx as default
     * @param $docxTemplatePath. User custom template (preserves Word content)
     */
    public function __construct($baseTemplatePath = PHPDOCX_BASE_TEMPLATE, $docxTemplatePath = '')

About Tidy we meant that this PHP extension has options to config it if needed in the INI file of the extension.

Anyway we're checking in detail the replace option to improve it and add new examples. The most important advantage of the PRO package is that unlike the trial one it's not crypted.

Regards.