Beispiel #1
0
<?php

// require_once dirname(__FILE__) . '/../../common.php';
$mailMerge = new Zend_Service_LiveDocx_MailMerge();
// Set WSDL of your premium service server
$mailMerge->setWsdl('https://api.example.com/1.2/mailmerge.asmx?WSDL');
$mailMerge->setUsername(DEMOS_ZEND_SERVICE_LIVEDOCX_USERNAME)->setPassword(DEMOS_ZEND_SERVICE_LIVEDOCX_PASSWORD);
$mailMerge->setLocalTemplate('template.docx');
$mailMerge->assign('software', 'Magic Graphical Compression Suite v1.9')->assign('licensee', 'Henry Döner-Meyer')->assign('company', 'Co-Operation')->assign('date', Zend_Date::now()->toString(Zend_Date::DATE_LONG))->assign('time', Zend_Date::now()->toString(Zend_Date::TIME_LONG))->assign('city', 'Berlin')->assign('country', 'Germany');
// Available on premium service only
$mailMerge->setDocumentPassword('aaaaaaaaaa');
// Available on premium service only
$mailMerge->setDocumentAccessPermissions(array('AllowHighLevelPrinting', 'AllowExtractContents'), 'myDocumentAccessPassword');
$mailMerge->createDocument();
$document = $mailMerge->retrieveDocument('pdf');
file_put_contents('document.pdf', $document);
unset($mailMerge);
Beispiel #2
0
<?php

require_once dirname(__FILE__) . '/../../common.php';
$phpLiveDocx = new Zend_Service_LiveDocx_MailMerge();
// Set WSDL of your premium service server
$phpLiveDocx->setWsdl('https://api.example.com/1.2/mailmerge.asmx?WSDL');
$phpLiveDocx->setUsername(DEMOS_ZEND_SERVICE_LIVEDOCX_USERNAME)->setPassword(DEMOS_ZEND_SERVICE_LIVEDOCX_PASSWORD);
$phpLiveDocx->setLocalTemplate('template.docx');
$phpLiveDocx->assign('software', 'Magic Graphical Compression Suite v1.9')->assign('licensee', 'Henry Döner-Meyer')->assign('company', 'Co-Operation')->assign('date', Zend_Date::now()->toString(Zend_Date::DATE_LONG))->assign('time', Zend_Date::now()->toString(Zend_Date::TIME_LONG))->assign('city', 'Berlin')->assign('country', 'Germany');
// Available on premium service only
$phpLiveDocx->setDocumentPassword('aaaaaaaaaa');
// Available on premium service only
$phpLiveDocx->setDocumentAccessPermissions(array('AllowHighLevelPrinting', 'AllowExtractContents'), 'myDocumentAccessPassword');
$phpLiveDocx->createDocument();
$document = $phpLiveDocx->retrieveDocument('pdf');
file_put_contents('document.pdf', $document);
unset($phpLiveDocx);
Beispiel #3
0
<?php

require_once dirname(__FILE__) . '/../../common.php';
system('clear');
print Demos_Zend_Service_LiveDocx_Helper::wrapLine(PHP_EOL . 'Using Hosted Solution and Fully-Licensed Servers' . PHP_EOL . PHP_EOL . 'This sample application illustrates how to use Zend_Service_LiveDocx_MailMerge with hosted and fully-licensed LiveDocx servers, by specifying an alternative SOAP client (must be instance of Zend_Soap_Client).' . PHP_EOL . PHP_EOL);
$phpLiveDocx = new Zend_Service_LiveDocx_MailMerge();
$phpLiveDocx->setWsdl('https://api.example.com/1.2/mailmerge.asmx?WSDL')->setUsername(DEMOS_ZEND_SERVICE_LIVEDOCX_USERNAME)->setPassword(DEMOS_ZEND_SERVICE_LIVEDOCX_PASSWORD);
$phpLiveDocx->getTemplateFormats();
// then call methods as usual
printf('Username : %s%sPassword : %s%s    WSDL : %s%s%s', $phpLiveDocx->getUsername(), PHP_EOL, $phpLiveDocx->getPassword(), PHP_EOL, $phpLiveDocx->getWsdl(), PHP_EOL, PHP_EOL);
unset($phpLiveDocx, $mySoapClient);