Coder Social home page Coder Social logo

Comments (11)

timwhitlock avatar timwhitlock commented on May 21, 2024

+1 for this.
I've been trying to fill text shapes and wondering what I was doing wrong.

from phppresentation.

JewrassicPark avatar JewrassicPark commented on May 21, 2024

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

    // a:prstGeom
    $objWriter->startElement('a:prstGeom');
    $objWriter->writeAttribute('prst', 'rect');
    $objWriter->endElement();
    $this->writeFill($objWriter, $shape->getFill());

Also make sure your fill is a 6 length color (so for black use 000000 and not FF000000 when setting the RGB)

from phppresentation.

pat123456 avatar pat123456 commented on May 21, 2024

why this don't work ? richtextShape extends abstractShape, it should be able to have fill ?

rotation don't work too in .odp

from phppresentation.

Progi1984 avatar Progi1984 commented on May 21, 2024

@jarredholman or @timwhitlock Have you got a sample source code for testing ? And a PPTX with the final render ?
May be have you got tested the "patch" of @JewrassicPark : is it ok for you ?

from phppresentation.

timwhitlock avatar timwhitlock commented on May 21, 2024

I've not tried the patch. The project I was working on has been delivered without fill support.

from phppresentation.

Progi1984 avatar Progi1984 commented on May 21, 2024

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

from phppresentation.

Gyzmoo avatar Gyzmoo commented on May 21, 2024

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

from phppresentation.

Progi1984 avatar Progi1984 commented on May 21, 2024

@Gyzmoo Sorry, i just correct fill and not borders. I work on it. :)

from phppresentation.

Progi1984 avatar Progi1984 commented on May 21, 2024

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

from phppresentation.

Gyzmoo avatar Gyzmoo commented on May 21, 2024

OK i've tested your Sample_10_Border and my own test on my template, borders works on RichText now, thank you!

from phppresentation.

Progi1984 avatar Progi1984 commented on May 21, 2024

I close so.

from phppresentation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.