Skip to content

Instantly share code, notes, and snippets.

@meritt
Created December 22, 2009 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meritt/261839 to your computer and use it in GitHub Desktop.
Save meritt/261839 to your computer and use it in GitHub Desktop.
Пример использования Zend_Service_LiveDocx
<?php
$date = new Zend_Date();
$date->setLocale('ru_RU');
$liveDocx = new Zend_Service_LiveDocx_MailMerge();
$liveDocx->setUsername('myUsername')
->setPassword('myPassword');
$liveDocx->setLocalTemplate('template.docx');
$liveDocx->assign('company', 'Сиренити')
->assign('date', $date->get(Zend_Date::DATE_LONG))
->assign('time', $date->get(Zend_Date::TIME_LONG))
->assign('city', 'Санкт-Петербург')
->assign('country', 'Россия');
$liveDocx->createDocument();
$document = $liveDocx->retrieveDocument('pdf');
file_put_contents('document.pdf', $document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment