Forum


Replies: 10   Views: 278
Upgrade guide from version 5 corporate to 9 advanced

Posted by admin  · 20-06-2019 - 11:37

Hello,

If the Normal style, that is the default style for paragraphs doesn't have a size value, then default document styles are used.

You can get the default styles from a DOCX using Indexer:

$indexer = new Indexer('document.docx');
$indexerOutput = $indexer->getOutput();

// default run-of-text styles
var_dump($indexerOutput['styles']['docDefaults']['rPrDefault']);
// default paragraph styles
var_dump($indexerOutput['styles']['docDefaults']['pPrDefault']);

You just need to get the w:sz value (the size value is usually found as default run-of-text style).

Regards.