Forum


Replies: 4   Views: 4222
Paragraph styles not behaving as expected...
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 AndrewCooper  · 03-06-2016 - 07:39

Hi,

In the examples for the createParagraphStyles (sample_1.php), I added "font" and "sz" to the style array.  Like so...

$style = array(
    'color' => '999999',
    'border' => 'single',
    'borderLeft' => 'double',
    'borderColor' => '990000',
    'borderRightColor' => '000099',
    'borderWidth' => 12,
    'borderTopWidth' => 24,
    'indentLeft' => 920,
    'font' => "Arial",
    'sz' => "48"
    );

Here's the problem.  It doesn't matter what I change the font to: Arial, Garamond, whatnot. It doesn't make any difference. It always uses the default Calibri font.

Also, the sz attribute causes the size of the font to change but at half of the value I put in. In the example I gave above the font ends up being Calibri at a size of 24. While this difference seems to be consistent and I could work with it, I'd like to know the reason this is happening.

Thanks,

Andrew