-
Notifications
You must be signed in to change notification settings - Fork 526
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
Border and Fill don't work for RichTextShapes. #61
Comments
+1 for this. |
I just got this to work with text shapes because I figured it would be way less resource intensive then allocating php images to make solid shapes. I had to open up powerpoints i made with fills and compare the xml to what phppowerpoint outputted. You can get it to work by adding "$this->writeFill($objWriter, $shape->getFill());" after the a:prstGeom element is added so in the writeShapeText function of the Slide class in the Powerpoint2007 writer folder change the block that starts with // a:prstGeom to this
Also make sure your fill is a 6 length color (so for black use 000000 and not FF000000 when setting the RGB) |
why this don't work ? richtextShape extends abstractShape, it should be able to have fill ? rotation don't work too in .odp |
@jarredholman or @timwhitlock Have you got a sample source code for testing ? And a PPTX with the final render ? |
I've not tried the patch. The project I was working on has been delivered without fill support. |
@jarredholman @timwhitlock @JewrassicPark : Hi all, I fix this issue in the develop branch. Could you test it ? I added a sample (Sample_09_Fill.php) for test. Thanks you for advance. |
Hi Progi, Thx for reply and fix in the develop branch, i've test the new Sample_09_Fill and all seems ok with Fill in RichTextShape However, i would like to add Border on a RichTextShape, i've try to debug the xml content of my file.ppt but it's not easy. Here is my code for Borders on RichTextShape: $shape->getBorder()->setLineStyle(Border::LINE_SINGLE)->setDashStyle(Border::DASH_SOLID)->setColor($colorBlack); var_dump($shape->getBorder()); On my debug (var_dump), my object shape with borders seems good, however, i dont have any borders on my file.ppt Any ideas ? Borders are working on Text or RichTextShape ? Thx for advice |
@Gyzmoo Sorry, i just correct fill and not borders. I work on it. :) |
@jarredholman @timwhitlock @JewrassicPark @Gyzmoo : Hi all, I fix this issue in the develop branch. Could you test it ? I added a sample (Sample_10_Border.php) for test. Thanks you for advance. |
OK i've tested your Sample_10_Border and my own test on my template, borders works on RichText now, thank you! |
I close so. |
From looking at the code (Writer/PowerPoint2007/Slide.php) it looks like Fill is only implemented for Table, and Border is only implemented for Table, Line and Pic.
Is it possible for them to be implemented for RichTextShape as well? This used to work in the older versions before PHPPowerPoint switched to namespaced classes.
The text was updated successfully, but these errors were encountered: