Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getMarginTop() give always 1400 twips after \PhpOffice\PhpWord\IOFactory::load('test.docx'); #885

Closed
amoulin974 opened this issue Sep 11, 2016 · 1 comment

Comments

@amoulin974
Copy link

amoulin974 commented Sep 11, 2016

I load docx file to know the size of margin for each section. I use this code

$phpWord = \PhpOffice\PhpWord\IOFactory::load('test.docx');
$sections = $phpword->getSections();
foreach($sections as $key=>$section) {
$style = $section->getStyle();
$marginTop = $style->getMarginTop();

var_dump($marginTop);

}
The var_dump() give me always 1400 twips regardless of the size of docx margin. I don't understand why.

@amoulin974
Copy link
Author

I thinks, i find why the function getMarginTop give a bad value

The name of node in xml is topMargin but in style/section attribut and method are marginTop

I change the name of attribut, method get, method set and my var_dump give me the good result.

I have never use github so i don't know how to propose this modification for every body

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant