Forum


Replies: 20   Views: 11160
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 shroom  · 18-11-2015 - 18:15

So basically, you will not help unless I spend $450 for one professional license and one developer license?  (the dev site is on a different domain, not a subdomain of the live site)

>>All properties are working perfectly as described in the documentation.

Believe me, I have been poring through any documentation I could find.

This works, the styles are merged:
$docx->importStyles($docroot.'/includes/REV_styles.docx', $type= 'merge',
     array('BookTitle',
             'BookChapter',
             'VerseHeading',
             'VerseHeadingMicro',
             'SectionHeading',
             'BlockQuote',
             'FootNote'));

This does not work, the styles are not imported and the PHPDOCX styles are not replaced:
$docx->importStyles($docroot.'/includes/REV_styles.docx', $type= 'replace');

And when the styles are merged successfully, and I do this:

$docx->embedHTML($html, array('strictWordStyles' => true,
'wordStyles' => array('<h2>' => 'BookTitle',
                               '<h3>' => 'BookChapter',
                               '.verseheading' => 'VerseHeading',
                               '.verseheadingmicro' => 'VerseHeadingMicro',
                               '.sectionheading' => 'SectionHeading',
                               '.blockquote' => 'BlockQuote',
                               '.footnote' => 'FootNote'
                               )));
 

If $html has <div class="blockquote">some text</div> the BlockQuote style is NOT applied.

If $html has <p class="blockquote">some text</p> the BlockQuote style IS applied.

The imported styles are only applied to classed <p> tags.

Anyway, thanks for the help you did provide.