PHP code example of wakeasp-inc / opentbs-bundle
1. Go to this page and download the library: Download wakeasp-inc/opentbs-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wakeasp-inc / opentbs-bundle example snippets
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Wakeasp\OpenTBSBundle\OpenTBSBundle(),
);
}
// get the service
$TBS = $this->get('opentbs');
// load your template
$TBS->LoadTemplate('template.docx');
// replace variables
$TBS->MergeField('client', array('name' => 'Ford Prefect'));
// send the file
$TBS->Show(OPENTBS_DOWNLOAD, 'file_name.docx');