Ejemplo n.º 1
0
    $shape->getLegend()->getFont()->setItalic(true);
}
// Create new PHPPowerPoint object
echo date('H:i:s') . ' Create new PHPPowerPoint object' . EOL;
$objPHPPowerPoint = new PhpPowerpoint();
// Set properties
echo date('H:i:s') . ' Set properties' . EOL;
$objPHPPowerPoint->getProperties()->setCreator('PHPOffice')->setLastModifiedBy('PHPPowerPoint Team')->setTitle('Sample 07 Title')->setSubject('Sample 07 Subject')->setDescription('Sample 07 Description')->setKeywords('office 2007 openxml libreoffice odt php')->setCategory('Sample Category');
// Remove first slide
echo date('H:i:s') . ' Remove first slide' . EOL;
$objPHPPowerPoint->removeSlideByIndex(0);
// Set Style
$oFill = new Fill();
$oFill->setFillType(Fill::FILL_SOLID)->setStartColor(new Color('FFE06B20'));
$oShadow = new Shadow();
$oShadow->setVisible(true)->setDirection(45)->setDistance(10);
fnSlide_Area($objPHPPowerPoint);
fnSlide_Bar($objPHPPowerPoint);
fnSlide_BarStacked($objPHPPowerPoint);
fnSlide_BarPercentStacked($objPHPPowerPoint);
fnSlide_BarHorizontal($objPHPPowerPoint);
fnSlide_Bar3D($objPHPPowerPoint);
fnSlide_Bar3DHorizontal($objPHPPowerPoint);
fnSlide_Pie3D($objPHPPowerPoint);
fnSlide_Pie($objPHPPowerPoint);
fnSlide_Scatter($objPHPPowerPoint);
// Save file
echo write($objPHPPowerPoint, basename(__FILE__, '.php'), $writers);
if (!CLI) {
    include_once 'Sample_Footer.php';
}
Ejemplo n.º 2
0
    $shape->getLegend()->getFont()->setItalic(true);
}
// Create new PHPPresentation object
echo date('H:i:s') . ' Create new PHPPresentation object' . EOL;
$objPHPPresentation = new PhpPresentation();
// Set properties
echo date('H:i:s') . ' Set properties' . EOL;
$objPHPPresentation->getProperties()->setCreator('PHPOffice')->setLastModifiedBy('PHPPresentation Team')->setTitle('Sample 07 Title')->setSubject('Sample 07 Subject')->setDescription('Sample 07 Description')->setKeywords('office 2007 openxml libreoffice odt php')->setCategory('Sample Category');
// Remove first slide
echo date('H:i:s') . ' Remove first slide' . EOL;
$objPHPPresentation->removeSlideByIndex(0);
// Set Style
$oFill = new Fill();
$oFill->setFillType(Fill::FILL_SOLID)->setStartColor(new Color('FFE06B20'));
$oShadow = new Shadow();
$oShadow->setVisible(true)->setDirection(45)->setDistance(10);
fnSlide_Area($objPHPPresentation);
fnSlide_Bar($objPHPPresentation);
fnSlide_BarStacked($objPHPPresentation);
fnSlide_BarPercentStacked($objPHPPresentation);
fnSlide_BarHorizontal($objPHPPresentation);
fnSlide_Bar3D($objPHPPresentation);
fnSlide_Bar3DHorizontal($objPHPPresentation);
fnSlide_Pie3D($objPHPPresentation);
fnSlide_Pie($objPHPPresentation);
fnSlide_Scatter($objPHPPresentation);
// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
if (!CLI) {
    include_once 'Sample_Footer.php';
}