Skip to content

Paragraph Indent UnitsΒ #507

@jelofson

Description

@jelofson

Hello,
I am confused about the paragraph style indent units. The docs say that the defaults measurement units are twips, which is fine, but when adding an indent value to a paragaraph style, they are not in twips. The value set is multiplied by 720. So, if I enter a value of 4, it comes out as 2880 twips, or 2 inches (5.08 cm). Why not just use twips? Then one could use the converters.

$value = $value * 720;

$phpWord->addTitleStyle(1, [
    'size'=>22,
    'color'=>'194775',
    'bold'=>true,
    'name'=>'Cambria',
    'allCaps'=>true
], [
    'align'=>'right',
    'indent'=>4 // 2880 twips = confusion
]);

Comments?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions