Exemplo n.º 1
0
<?php

/** Error reporting */
error_reporting(E_ALL);
/** Include path **/
ini_set('include_path', ini_get('include_path') . ';../Classes/');
/** PHPVisio */
include 'PHPVisio.php';
if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) {
    define('EOL', PHP_EOL);
} else {
    define('EOL', '<br />');
}
// Create new PHPVisio object
echo date('H:i:s') . ' Create new PHPVisio object' . EOL;
$objReader = PHPVisio_IOFactory::createReader('Dia');
$oPHPVisio = $objReader->load('02sample.dia');
// Set properties
echo date('H:i:s') . ' Set properties' . EOL;
echo 'Creator > ' . $oPHPVisio->getProperties()->getCreator() . EOL;
echo 'LastModifiedBy > ' . $oPHPVisio->getProperties()->getLastModifiedBy() . EOL;
echo 'Title > ' . $oPHPVisio->getProperties()->getTitle() . EOL;
echo 'Subject > ' . $oPHPVisio->getProperties()->getSubject() . EOL;
echo 'Description > ' . $oPHPVisio->getProperties()->getDescription() . EOL;
echo EOL;
// ForEach Page
echo 'Pages >' . EOL;
$oSheets = $oPHPVisio->getAllSheets();
foreach ($oSheets as $oSheet) {
    echo '>> Name : ' . $oSheet->getTitle() . EOL;
    echo '>> ID : ' . $oSheet->getID() . EOL;
Exemplo n.º 2
0
<?php

/** Error reporting */
error_reporting(E_ALL);
/** Include path **/
ini_set('include_path', ini_get('include_path') . ';../Classes/');
/** PHPVisio */
include 'PHPVisio.php';
if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) {
    define('EOL', PHP_EOL);
} else {
    define('EOL', '<br />');
}
// Create new PHPVisio object
echo date('H:i:s') . ' Create new PHPVisio object' . EOL;
$objReader = PHPVisio_IOFactory::createReader('MSVisio2013');
$oPHPVisio = $objReader->load('02sample.vsdx');
// Set properties
echo date('H:i:s') . ' Set properties' . EOL;
echo 'Creator > ' . $oPHPVisio->getProperties()->getCreator() . EOL;
echo 'LastModifiedBy > ' . $oPHPVisio->getProperties()->getLastModifiedBy() . EOL;
echo 'Title > ' . $oPHPVisio->getProperties()->getTitle() . EOL;
echo 'Subject > ' . $oPHPVisio->getProperties()->getSubject() . EOL;
echo 'Description > ' . $oPHPVisio->getProperties()->getDescription() . EOL;
echo EOL;
// ForEach Page
echo 'Pages >' . EOL;
$oSheets = $oPHPVisio->getAllSheets();
foreach ($oSheets as $oSheet) {
    echo '>> Name : ' . $oSheet->getTitle() . EOL;
    echo '>> ID : ' . $oSheet->getID() . EOL;