phppresentation

PhpPresentation imagecreatefromstring(): Data is not in a recognized format - PHP7.2

心不动则不痛 提交于 2021-01-27 00:52:24
问题 I am trying to use PhpPresentation to read a sample.pptx file using the simple instructions for readers in their docs and I am getting: imagecreatefromstring(): Data is not in a recognized format I have checked that I have PHP7.2-gd installed and all of the other dependencies. My Code: require_once 'vendor/autoload.php'; use \PhpOffice\PhpPresentation\PhpPresentation; use \PhpOffice\PhpPresentation\IOFactory; use \PhpOffice\PhpPresentation\Style\Color; use \PhpOffice\PhpPresentation\Style

PHPPresentation lose styling when we copy from particular path and saving new pptx

亡梦爱人 提交于 2020-01-05 10:08:13
问题 I have search around google regarding PHPPresentation but nothing found. I know this type of question already asked (PHPOffice PHPPresentation lose original styling on saving pptx) and i have checked the answer of this particular question (https://github.com/PHPOffice/PHPPresentation/issues/161) I have done according to above answer but its not working at all. Here is my below code:- $templatepath = public_path('images/samples/sample.pptx'); $pptReader = IOFactory::createReader(

How do I customize the line in a line chart with PHPPowerpoint/PHPPresentation?

非 Y 不嫁゛ 提交于 2019-12-31 06:00:20
问题 How do I customize the lines in the line charts on PHPPowerpoint/PHPPresentation? I can't find anything in there documentation or in the samples to figure this out. Here's my code: $seriesData = array( 'Monday' => 12, 'Tuesday' => 15, 'Wednesday' => 13, 'Thursday' => 17, 'Friday' => 14, 'Saturday' => 9, 'Sunday' => 7 ); $lineChart = new Line(); $series = new Series('Downloads', $seriesData); $series->setShowSeriesName(false); $series->setShowValue(false); $series->setShowLeaderLines(false);

PHPOffice PHPPresentation lose original styling on saving pptx

拟墨画扇 提交于 2019-12-12 21:50:05
问题 I have simple code that: Load template pptx (*) Duplicate few slides Hydrate those slides with values (just replacing place-holder texts) Save result to new file Unfortunately PHPOffice's PHPPresentation is unable to retain slide styling present in template. Slides saved in step 4. are all white (default styling). Is there a way to explicitly copy that styling? Is it PHPPresentation limitation 'cause it's unable to read styling or something? (*) Described issue persist for ppt/odp too. No

How do I customize the line in a line chart with PHPPowerpoint/PHPPresentation?

狂风中的少年 提交于 2019-12-02 09:44:56
How do I customize the lines in the line charts on PHPPowerpoint/PHPPresentation? I can't find anything in there documentation or in the samples to figure this out. Here's my code: $seriesData = array( 'Monday' => 12, 'Tuesday' => 15, 'Wednesday' => 13, 'Thursday' => 17, 'Friday' => 14, 'Saturday' => 9, 'Sunday' => 7 ); $lineChart = new Line(); $series = new Series('Downloads', $seriesData); $series->setShowSeriesName(false); $series->setShowValue(false); $series->setShowLeaderLines(false); $lineChart->addSeries($series); $shape = $currentSlide->createChartShape(); $shape-