Forum


Replies: 3   Views: 181
Cómo usar la propiedad headinglevel en un custom paragraph style
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  · 26-07-2024 - 13:21

Hola,

Para que estén disponibles los estilos a nivel de documento, deben añadirse al documento, no a un WordFragment.

En lugar de:

$wf->createParagraphStyle('title2_anexo', $heading2_anexo_style);

que se está añadiendo a un WordFragment, debe añadirse al objecto del documento, por ejemplo:

$docx->createParagraphStyle('title2_anexo', $heading2_anexo_style);

Saludos.