Replies: 2   Views: 3346
Three unwanted styles
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  · 28-12-2015 - 03:13

On your suggestion, I am using another Word docx as a template for creating docx's with phpdocx, and it works well.  My template docx does not have any of the PHPDOCX styles in it.  Every docx created with phpdocx from my template contains the styles "Title PHPDOCX", "Subtitle PHPDOCX", and "List Paragraph PHPDOCX".  These styles are not being used in the docx being generated.  Why are they being included with the docx?  Where in the code are these styles being included?  Is there a way to prevent them from being included?


Posted by admin  · 28-12-2015 - 08:28


That styles, minimal of they available within the default template, are always included because they are needed to the correct running of the library. There's no option to prevent them from being included.

These styles doesn't conflict with the correct work of Word, so if you need to remove them you need to change the library or change the base template, not the docx template. To change it by your self we recommend you to search for the importStyles call of the constructor in the main CreateDocx class (around line 780).


Posted by shroom  · 28-12-2015 - 16:28

Thanks.  In OOXMLResources.xml, I added the attributes w:semiHidden and w:unhideWhenUsed to those three styles and they no longer appear in the style bar.