Embed Powerpoints dynamically on my Website for students and theachers

时间:2017-06-12 16:59:58

标签: javascript php html ajax powerpoint

I need to embed the powerpoints that the theachers had uploaded to my website.

Things that i've tried:

  1. Embed with using view.officeapps.live.com

    The problem with this is that the powerpoints shown on the iframe are all on stream so if someone whants to the powerpoint on the same the powerpoint on the same time on differnt slides its impossible.

  2. Use PhpPowerpoint API

    I can´t embed powerpoints with this API I've tried almost everything to get it to work but it seems that its impossible for me.

Heres the code of my PhpPowerpoint

<?php

use PhpOffice\PhpPresentation\PhpPresentation;
use PhpOffice\PhpPresentation\IOFactory;
use PhpOffice\PhpPresentation\Style\Alignment;
use PhpOffice\PhpPresentation\Style\Color;
use PhpOffice\PhpPresentation\Shape\MemoryDrawing;
use PhpOffice\PhpPresentation\Style\Fill;

require_once 'PhpPresentation/src/PhpPresentation/Autoloader.php';
\PhpOffice\PhpPresentation\Autoloader::register();

require_once 'Common/src/Common/Autoloader.php';
\PhpOffice\Common\Autoloader::register();

$pptReader = IOFactory::createReader('PowerPoint2007');
$oPHPPresentation = $pptReader->load('http://webitcloud.net/PW/1617/weduc/Teste.pptx');

$oTree = new PhpPptTree($oPHPPresentation);
echo $oTree->display();

?>

The Powerpoint that i am trying to embed is Tetste.pptx. All paths are correct and the error that appers is the following:

'Could not open http://webitcloud.net/PW/1617/weduc/Teste.pptx for reading! File does not exist.' in /home/webitcloud/public_html/PW/1617/weduc/PhpPresentation/src/PhpPresentation/Reader/PowerPoint2007.php:97

Things that could help me

  1. Some kind of API similar to PhpPowerpoint that lets me embend my pptx dynamically.

  2. Some code that converts the powerpoints that the Teachers had uploaded previously into html format.

    Thanks in advance,

    Afonso Martinho.

0 个答案:

没有答案