PHPPresentation
PHPPresentation copied to clipboard
Top/Bottom Margins in Table Cell Paragraph
Thanks for all who make this Repo going:
I saw https://github.com/PHPOffice/PHPPresentation/pull/327 that went to develop-Branch. To set the margins for left and right is working fine now, but not top and bottom. I can also reproduce it in the samples as there are clearly no top/bottom margins.
Thanks!
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
@maikgramatte Could you give a screenshot of the bad render ?
@Progi1984 Thanks for the quick Feedback:
$cell = $row->nextCell(); $cell->getBorders()->getBottom()->setLineWidth(0)->setLineStyle(Border::LINE_NONE); $cell->getBorders()->getLeft()->setLineWidth(0)->setLineStyle(Border::LINE_NONE); $cell->getBorders()->getTop()->setLineWidth(0)->setLineStyle(Border::LINE_NONE); $cell->getBorders()->getRight()->setLineWidth(0)->setLineStyle(Border::LINE_NONE); $paragraph = $cell->getActiveParagraph(); $paragraph->getAlignment()->setMarginLeft(10)->setMarginTop(10)->setMarginBottom(10)->setMarginRight(10);
Will look somehow like this: The Margins to the left and right are fine, but top and bottom are not there.
Thank you very much.
Same issue
+1
The PR is in validation on the Travis CI side :)
@Progi1984 please look at my commit here: https://github.com/maikgramatte/PHPPresentation/commit/2567a0eac882020c4b4a7d22c38b8cc70b104f34 I also saw an issue with setting the height of the tr, which i set to 0. Otherwise i got broken a PPTX when i used to high marginTop or/and marginBottom. But i don't know what kind of sideeffect this has.
Thats why i changed the height to 0, which is working fine.
Fixed in develop branch :)
@maikgramatte Could you open a new issue ?
@maikgramatte And test the fix :)
@maikgramatte Thanks for the issue. Normally the develop branch has fixed this issue. Could you test it ? Thanks.
@maikgramatte Have you had some time to test the develop branch with your code ?
@maikgramatte PhpPresentation 0.9.0 has been released. I would like to solve your issue for 0.10.0. Could you answer to my question ?