PHPPresentation icon indicating copy to clipboard operation
PHPPresentation copied to clipboard

Top/Bottom Margins in Table Cell Paragraph

Open maikgramatte opened this issue 7 years ago • 12 comments

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 avatar Mar 28 '17 12:03 maikgramatte

@maikgramatte Could you give a screenshot of the bad render ?

Progi1984 avatar Mar 29 '17 13:03 Progi1984

@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.

image

Thank you very much.

maikgramatte avatar Apr 05 '17 13:04 maikgramatte

Same issue

abdilahrf avatar May 08 '17 05:05 abdilahrf

+1

shdev avatar May 21 '17 12:05 shdev

The PR is in validation on the Travis CI side :)

Progi1984 avatar May 21 '17 14:05 Progi1984

@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.

maikgramatte avatar May 21 '17 14:05 maikgramatte

Fixed in develop branch :)

Progi1984 avatar May 21 '17 14:05 Progi1984

@maikgramatte Could you open a new issue ?

Progi1984 avatar May 21 '17 14:05 Progi1984

@maikgramatte And test the fix :)

Progi1984 avatar May 21 '17 14:05 Progi1984

@maikgramatte Thanks for the issue. Normally the develop branch has fixed this issue. Could you test it ? Thanks.

Progi1984 avatar May 22 '17 11:05 Progi1984

@maikgramatte Have you had some time to test the develop branch with your code ?

Progi1984 avatar May 30 '17 12:05 Progi1984

@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 ?

Progi1984 avatar Jul 05 '17 12:07 Progi1984