Comments (11)
+1 for this.
I've been trying to fill text shapes and wondering what I was doing wrong.
from phppresentation.
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.
why this don't work ? richtextShape extends abstractShape, it should be able to have fill ?
rotation don't work too in .odp
from phppresentation.
@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.
I've not tried the patch. The project I was working on has been delivered without fill support.
from phppresentation.
@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.
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.
@Gyzmoo Sorry, i just correct fill and not borders. I work on it. :)
from phppresentation.
@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.
OK i've tested your Sample_10_Border and my own test on my template, borders works on RichText now, thank you!
from phppresentation.
I close so.
from phppresentation.
Related Issues (20)
- It's not working in PHP 8.1
- Issue While Export Data Objects in Pimcore as PPT Format Through PXP Page. HOT 1
- We repaired your presentation. Pie Work but not Bar HOT 1
- Notes in pptx gives error on reader HOT 2
- Can we create a paragraph with rich text?
- Broken layout when save PPTX
- how to save old array value of radio input component?
- Presentations break with version 2309 of PowerPoint HOT 24
- Cannot read .ppt file (PowerPoint97): The feature is not implemented. Please create an issue.
- How to hide empty (value 0%) chartBarClustered ? HOT 2
- Set outline width does not work
- A bug occurs when creating a line chart
- Text missing in PowerPoint, but shows up in Google Slides, LibreOffice Impress
- Error Undefined type 'use\...\'
- The file "" doesn't exist HOT 1
- Problem with instalation: phpoffice/phppresentation 1.0.0 requires phpoffice/phpspreadsheet ^1.9.0
- Data Label Positions not working for Doughnut Chart
- Join two pptx files version 2016 or higher
- Support for Slide Sections
- I would like an option to not load images.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phppresentation.