Forum


Replies: 4   Views: 1959
Problemas con el corrector ortográfico en los documentos generados
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  · 21-03-2019 - 07:56

Hola,

Tienes que modificar el setting proofState del documento.

La siguiente respuesta a un usuario solucionó la misma pregunta:

The problem is that when MS Word saves a DOCX, it sets this XML tag:

<w:proofState w:grammar="clean" w:spelling="clean"/>

in the settings.xml file. So if you add anything to the DOCX changing the document, when MS Word opens the document, the w:proofState is readed and as it has a clean value it doesn't check grammar nor spell:

<w:proofState w:grammar="clean" w:spelling="clean"/>

instead of:

<w:proofState w:grammar="dirty" w:spelling="dirty"/>

Desde esta respuesta varias mejoras en phpdocx permiten hacer este cambio: mediante la opción customSetting del método docxSettings, o modificando la misma etiqueta en el contenido word/settings.xml del base template en DOCXStructureTemplate.php, o utilizando un base template propio.

Todos los paquetes incluyen el ejemplo examples/LayoutAndGeneral/docxSettings/sample_2.php que hace este cambio.

Saludos.