<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LiveDocx in PHP &#187; Zend Framework</title>
	<atom:link href="http://www.phplivedocx.org/category/zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phplivedocx.org</link>
	<description>Zend Framework Implementation of LiveDocx</description>
	<lastBuildDate>Wed, 21 Dec 2011 12:39:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Including Sub-Templates within a Template</title>
		<link>http://www.phplivedocx.org/2011/06/09/including-sub-templates-within-a-template/</link>
		<comments>http://www.phplivedocx.org/2011/06/09/including-sub-templates-within-a-template/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 11:31:25 +0000</pubDate>
		<dc:creator>Jonathan Maron</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Samples]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.phplivedocx.org/?p=1412</guid>
		<description><![CDATA[An oft underestimated feature of LiveDocx is support for the Microsoft Word INCLUDETEXT field type, which allows templates to be chained together into one larger template. The entire contents of the sub-templates are brought into the main template in the order in which the fields are inserted, during the merge process. The final document contains [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.phplivedocx.org/wp-content/uploads/2011/06/subtemplates.png" width="560" height="350" alt="Sub-templates in Microsoft Word" title="Sub-templates in Microsoft Word" /></p>
<p>An oft underestimated feature of LiveDocx is support for the Microsoft Word INCLUDETEXT field type, which allows templates to be chained together into one larger template. The entire contents of the sub-templates are brought into the main template in the order in which the fields are inserted, during the merge process. The final document contains the contents of the template and all sub-templates.</p>
<p>To learn more about INCLUDETEXT and how to insert INCLUDETEXT fields into your template, please take a look the following articles:</p>
<ul>
<li><a href="http://support.microsoft.com/kb/253957">WD2000: How to Create a Long Document in Word</a>, Section <em>IncludeText Field</em></li>
</ul>
<ul>
<li><a href="http://blog.livedocx.com/post/Using-INCLUDETEXT-Fieldse28093Part-1-Creating-Templates.aspx">Using IncludeText Fields &#8211; Part 1: Creating Templates</a></li>
</ul>
<ul>
<li><a href="http://blog.livedocx.com/post/Using-INCLUDETEXT-Fieldse28093Part-2-Putting-It-All-To-Work.aspx">Using IncludeText Fields &#8211; Part 2: Putting It All To Work</a></li>
</ul>
<p><em>Zend\Service\LiveDocx\MailMerge</em> provides two methods to control how or whether sub-templates are included in the main template.</p>
<p>In the default state, all templates, which are referenced in INCLUDETEXT fields are included during the merge process.</p>
<p>If you do not want this to be the case, the method <em>setIgnoreSubTemplates()</em> can be set to <em>true</em>. This disables the inclusion of <strong>all</strong> sub-templates during the merge process. Using the <strong>free public</strong> LiveDocx service, you cannot selectively define which templates should be included. It is an all-or-nothing approach.</p>
<p>The <strong>premium</strong> and <strong>licensed</strong> versions of the LiveDocx service, on the other hand, allow for more fine grained control. These versions provide the method <em>setSubTemplateIgnoreList()</em>, which takes an array of filenames that should not be included. This way, you can, for example, included sub-templates 2 and 5, but not 1, 3 and 4.</p>
<p>The methods <em>setIgnoreSubTemplates()</em> and <em>setSubTemplateIgnoreList()</em> will be part of Zend Framework 2 when it ships. The latest code updates should be merged into <em>master</em> on the Zend canonical repository within the next few weeks. For the time being, the code is still in my GitHub repository, in the branch <em>livedocx-2.0</em>. </p>
<p>You can clone the latest code at:<br /><a href="https://github.com/jonathanmaron/zf2/tree/livedocx-2.0">https://github.com/jonathanmaron/zf2/tree/livedocx-2.0</a></p>
<p>Take a look at the <a href="https://github.com/jonathanmaron/zf2/tree/livedocx-2.0/demos/Zend/Service/LiveDocx/MailMerge/subtemplates">following directory</a> for some demonstration applications that illustrate the methods <em>setIgnoreSubTemplates()</em> and <em>setSubTemplateIgnoreList()</em></p>

<div class="wp_syntax"><div class="code"><pre class="bash">/demos/Zend/Service/LiveDocx/MailMerge/templates-ignore/</pre></div></div>

<p>Feel free to contact me, using the comments section below, if you need any help, or notice any inconsistencies in the code.</p>
<p style="padding: 5px; background-color: #EFEFEF;"><strong>June 10, 2011</strong>: The code updates mentioned in this post have now been merged into <em>master</em> on the Zend canonical repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phplivedocx.org/2011/06/09/including-sub-templates-within-a-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LiveDocx in Zend Framework 2 &#8211; an update</title>
		<link>http://www.phplivedocx.org/2011/05/26/livedocx-in-zend-framework-2-an-update/</link>
		<comments>http://www.phplivedocx.org/2011/05/26/livedocx-in-zend-framework-2-an-update/#comments</comments>
		<pubDate>Thu, 26 May 2011 08:59:10 +0000</pubDate>
		<dc:creator>Jonathan Maron</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Samples]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.phplivedocx.org/?p=1362</guid>
		<description><![CDATA[I am delighted to announce that the Zend Framework 2 implementation of the LiveDocx service is getting nearer completion. At the moment, the code is still in my GitHub repository, in the branch livedocx-2.0. It should be merged into master on the Zend canonical repository within the next few weeks. You can clone the latest [...]]]></description>
			<content:encoded><![CDATA[<p>I am delighted to announce that the Zend Framework 2 implementation of the LiveDocx service is getting nearer completion. At the moment, the code is still in my GitHub repository, in the branch <em>livedocx-2.0</em>. It should be merged into <em>master</em> on the Zend canonical repository within the next few weeks.</p>
<p>You can clone the latest code at:<br /><a href="https://github.com/jonathanmaron/zf2/tree/livedocx-2.0">https://github.com/jonathanmaron/zf2/tree/livedocx-2.0</a></p>
<p><strong>What&#8217;s new in this version?</strong></p>
<ul>
<li>Exception handling has been migrated to ZF2 practices i.e. <em>Exception/RuntimeException</em> and <em>Exception/InvalidArgumentException</em>.</li>
</ul>
<ul>
<li>Exceptions from the backend service now contain <strong>only</strong> the message from the backend service. The backend engineers requested this be the case, as it aides support cases.</li>
</ul>
<ul>
<li>The inline documentation has been updated.</li>
</ul>
<ul>
<li>The methods <em>logIn()</em> and <em>logOut()</em> are now <em>protected</em> in scope.</li>
</ul>
<ul>
<li>The methods <em>setIsLoggedIn()</em> and <em>getIsLoggedIn()</em> were added.</li>
</ul>
<ul>
<li>The quality and coverage of unit tests have been vastly improved (63 tests, 203 assertions).</li>
</ul>
<p>You are welcome to clone the repository and try out the new code for yourself. Feel free to contact me, using the comments section below, if you need any help, or notice any inconsistencies in the code.</p>
<p style="padding: 5px; background-color: #EFEFEF;"><strong>June 10, 2011</strong>: The code updates mentioned in this post have now been merged into <em>master</em> on the Zend canonical repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phplivedocx.org/2011/05/26/livedocx-in-zend-framework-2-an-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Porting Zend_Service_LiveDocx to ZF 2.0</title>
		<link>http://www.phplivedocx.org/2010/06/08/porting-zend_service_livedocx-to-zend-framework-2-0/</link>
		<comments>http://www.phplivedocx.org/2010/06/08/porting-zend_service_livedocx-to-zend-framework-2-0/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 07:56:07 +0000</pubDate>
		<dc:creator>Jonathan Maron</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.phplivedocx.org/?p=1235</guid>
		<description><![CDATA[There has been a lot of talk about Zend Framework 2.0 in the past few weeks. One of the major new features is the consistent use of namespaces through out the framework. This requires that all components be re-written to take advantage of this PHP 5.3 feature. Although the release of Zend Framework 2.0 is [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a lot of talk about <a href="http://weierophinney.net/matthew/archives/241-State-of-Zend-Framework-2.0.html">Zend Framework 2.0</a> in the past few weeks. One of the major new features is the consistent use of namespaces through out the framework. This requires that all components be re-written to take advantage of this PHP 5.3 feature.</p>
<p>Although the release of Zend Framework 2.0 is a long way off &#8212; currently there is no official release plan &#8212; contributors are encouraged to port their components as soon as possible.</p>
<p>Therefore, I am delighted to announce that you can download a version of <em>\Zend\Service\LiveDocx</em>, complete with the latest development version of Zend Framework 2.0 from my account at <a href="http://github.com/jonathanmaron/zf2/tree/zend-service-livedocx-1.3">GitHub</a>.</p>
<p>In particular, take a look at the shipped demo applications, in the directory <em>/demos/Zend/Service/LiveDocx</em>. They illustrate how to use all parts of the framework and offer a good introduction to the usage of namespaces in PHP 5.3, if this topic is new to you.</p>
<p>To whet your appetite, below is the <em>bitmaps</em> demo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="php">use Zend\<span style="color: #000066;">Date</span>\<span style="color: #000066;">Date</span>;
use Zend\Service\LiveDocx\MailMerge;
&nbsp;
<span style="color: #0000ff;">$mailMerge</span> = <span style="color: #000000; font-weight: bold;">new</span> MailMerge<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0000ff;">$mailMerge</span>-&gt;<span style="color: #006600;">setUsername</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'myUsername'</span><span style="color: #66cc66;">&#41;</span>
          -&gt;<span style="color: #006600;">setPassword</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'myPassword'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0000ff;">$mailMerge</span>-&gt;<span style="color: #006600;">setLocalTemplate</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'template.docx'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0000ff;">$mailMerge</span>-&gt;<span style="color: #006600;">assign</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'software'</span>, <span style="color: #ff0000;">'Magic Graphical Compression Suite v1.9'</span><span style="color: #66cc66;">&#41;</span>
          -&gt;<span style="color: #006600;">assign</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'licensee'</span>, <span style="color: #ff0000;">'Daï Lemaitre'</span><span style="color: #66cc66;">&#41;</span>
          -&gt;<span style="color: #006600;">assign</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'company'</span>,  <span style="color: #ff0000;">'Megasoft Co-operation'</span><span style="color: #66cc66;">&#41;</span>
          -&gt;<span style="color: #006600;">assign</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'date'</span>,     <span style="color: #000066;">Date</span>::<span style="color: #006600;">now</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>-&gt;<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066;">Date</span>::<span style="color: #006600;">DATE_LONG</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
          -&gt;<span style="color: #006600;">assign</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'time'</span>,     <span style="color: #000066;">Date</span>::<span style="color: #006600;">now</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>-&gt;<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066;">Date</span>::<span style="color: #006600;">TIME_LONG</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
          -&gt;<span style="color: #006600;">assign</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'city'</span>,     <span style="color: #ff0000;">'Lyon'</span><span style="color: #66cc66;">&#41;</span>
          -&gt;<span style="color: #006600;">assign</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'country'</span>,  <span style="color: #ff0000;">'France'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0000ff;">$mailMerge</span>-&gt;<span style="color: #006600;">createDocument</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #008080; font-style: italic;">// Get all bitmaps</span>
<span style="color: #0000ff;">$bitmaps</span> = <span style="color: #0000ff;">$mailMerge</span>-&gt;<span style="color: #006600;">getAllBitmaps</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span>, <span style="color: #ff0000;">'png'</span><span style="color: #66cc66;">&#41;</span>;      <span style="color: #008080; font-style: italic;">// zoomFactor, format</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$bitmaps</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$pageNumber</span> =&gt; <span style="color: #0000ff;">$bitmapData</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #0000ff;">$filename</span> = <span style="color: #000066;">sprintf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'document-page-%d.png'</span>, <span style="color: #0000ff;">$pageNumber</span><span style="color: #66cc66;">&#41;</span>;
    file_put_contents<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$filename</span>, <span style="color: #0000ff;">$bitmapData</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000066;">unset</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$mailMerge</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>Note, this is development code and should not yet be used in production applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phplivedocx.org/2010/06/08/porting-zend_service_livedocx-to-zend-framework-2-0/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Zend_Service_LiveDocx Introduction by A. Nuzzo</title>
		<link>http://www.phplivedocx.org/2010/03/17/zend_service_livedocx-introduction-by-alessandro-nuzzo/</link>
		<comments>http://www.phplivedocx.org/2010/03/17/zend_service_livedocx-introduction-by-alessandro-nuzzo/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 08:16:57 +0000</pubDate>
		<dc:creator>Jonathan Maron</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.phplivedocx.org/?p=1185</guid>
		<description><![CDATA[Please note: This blog post is for our Italian-speaking readers only. Alessandro Nuzzo has just published a great introduction about Zend_Service_LiveDocx. If you are able to read Italian take a look at the following: Mi capita spesso di dover generare dinamicamente dei file PDF o DOC. Alla ricerca di una soluzione che mi facilitasse il [...]]]></description>
			<content:encoded><![CDATA[<p style="padding: 5px; background-color: #EFEFEF;"><strong>Please note</strong>: This blog post is for our Italian-speaking readers only.</p>
<p>Alessandro Nuzzo has just published a great introduction about <em>Zend_Service_LiveDocx</em>. If you are able to read Italian take a look at the following: </p>
<blockquote><p>Mi capita spesso di dover generare dinamicamente dei file PDF o DOC. Alla ricerca di una soluzione che mi facilitasse il lavoro mi sono imbattuto in LiveDocx, un servizio basato su SOAP che permette di generare dei documenti partendo da dei template creati con un word processor. Solitamente quando devo generare dei PDF utilizzo 2 approcci: o l&#8217;&#8221;HTML-to-PDF Approach&#8221; oppure il &#8220;Programmatic Approach&#8221;.</p></blockquote>
<p>Continue reading:</p>
<ul>
<li><a href="http://blog.html.it/09/03/2010/livedocx-template-based-document-generation/?utm_source=feedburner&#038;utm_medium=feed&#038;utm_campaign=Feed%3A+Edit">LiveDocx: template based document generation</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.phplivedocx.org/2010/03/17/zend_service_livedocx-introduction-by-alessandro-nuzzo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend_Service_LiveDocx stable released</title>
		<link>http://www.phplivedocx.org/2010/01/28/zend_service_livedocx-stable-has-been-released/</link>
		<comments>http://www.phplivedocx.org/2010/01/28/zend_service_livedocx-stable-has-been-released/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 08:10:55 +0000</pubDate>
		<dc:creator>Jonathan Maron</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.phplivedocx.org/?p=1173</guid>
		<description><![CDATA[I am delighted to announce that the final, stable version of Zend_Service_LiveDocx in Zend Framework 1.10 has just been released. Download Zend Framework 1.10.0 Full and read the updated documentation on ZendFramework.com. You can find Zend_Service_LiveDocx_* at the following locations in the distribution tree: Source code /library/Zend/Service/LiveDocx.php /library/Zend/Service/LiveDocx/MailMerge.php /library/Zend/Service/LiveDocx/Exception.php Unit tests /tests/Zend/Service/LiveDocx/LiveDocxTest.php /tests/Zend/Service/LiveDocx/MailMergeTest.php /tests/Zend/Service/LiveDocx/MailMerge/* Demonstration [...]]]></description>
			<content:encoded><![CDATA[<p>I am delighted to announce that the <strong>final</strong>, <strong>stable</strong> version of <em>Zend_Service_LiveDocx</em> in <strong>Zend Framework 1.10</strong> has just been released.</p>
<p>Download <a href="http://www.zendframework.com/download/current/">Zend Framework 1.10.0 Full</a> and read the updated <a href="http://www.zendframework.com/manual/en/zend.service.livedocx.html">documentation</a> on ZendFramework.com.</p>
<p>You can find <em><em>Zend_Service_LiveDocx</em>_*</em> at the following locations in the distribution tree:</p>
<h3>Source code</h3>

<div class="wp_syntax"><div class="code"><pre class="bash">/library/Zend/Service/LiveDocx.php
/library/Zend/Service/LiveDocx/MailMerge.php
/library/Zend/Service/LiveDocx/Exception.php</pre></div></div>

<h3>Unit tests</h3>

<div class="wp_syntax"><div class="code"><pre class="bash">/tests/Zend/Service/LiveDocx/LiveDocxTest.php
/tests/Zend/Service/LiveDocx/MailMergeTest.php
/tests/Zend/Service/LiveDocx/MailMerge/*</pre></div></div>

<h3>Demonstration applications</h3>

<div class="wp_syntax"><div class="code"><pre class="bash">/demos/Zend/Service/LiveDocx/*</pre></div></div>

<p>I really recommend taking a look at the demonstration applications, as they illustrate all of <em>Zend_Service_LiveDocx</em> functionality.</p>
<p>You can check that your server environment is set up correctly to run <em>Zend_Service_LiveDocx</em>, by executing <em>check-environment.php</em> in the directory <em>/demos/Zend/Service/LiveDocx/</em>.</p>
<p>I would like to thank <em>Matthew Weier O&#8217;Phinney</em>, Zend Framework Project Lead and all other members of the Zend Framework community, who have contributed to <em>Zend_Service_LiveDocx</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phplivedocx.org/2010/01/28/zend_service_livedocx-stable-has-been-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating from Tis_ to Zend_Service_LiveDocx</title>
		<link>http://www.phplivedocx.org/2010/01/21/migrating-from-tis_-to-zend_service_livedocx/</link>
		<comments>http://www.phplivedocx.org/2010/01/21/migrating-from-tis_-to-zend_service_livedocx/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 07:59:16 +0000</pubDate>
		<dc:creator>Jonathan Maron</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.phplivedocx.org/?p=1156</guid>
		<description><![CDATA[The first implementation of LiveDocx in PHP was in a family of classes called Tis_Service_LiveDocx. It was necessary to give the classes the prefix Tis_ as the Zend Framework coding standards allow the prefix Zend_ to be used only for classes, which are part of the official Zend Framework. As of the first alpha version [...]]]></description>
			<content:encoded><![CDATA[<p>The first implementation of LiveDocx in PHP was in a family of classes called <em>Tis_Service_LiveDocx</em>. It was necessary to give the classes the prefix <em>Tis_</em> as the Zend Framework coding standards allow the prefix <em>Zend_</em> to be used <strong>only</strong> for classes, which are part of the official Zend Framework.</p>
<p>As of the first alpha version of <a href="http://www.zendframework.com/download/latest">Zend Framework 1.10</a>, the functionality of <em>Tis_Service_LiveDocx</em> is available directly in the Zend Framework in <em>Zend_Service_LiveDocx</em>. </p>
<p>As of today, the use of <em>Tis_Service_LiveDocx</em> is deprecated. Instead use <em>Zend_Service_LiveDocx</em>.</p>
<p>With the exception of the constructor, the API of <em>Zend_Service_LiveDocx</em> is 100% backward compatible to that of <em>Tis_Service_LiveDocx</em>.</p>
<p>At the wish of the Zend Framework community, the constructor was updated from:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="php"><span style="color: #008080; font-style: italic;">// deprecated - do not use</span>
<span style="color: #0000ff;">$mailMerge</span> = <span style="color: #000000; font-weight: bold;">new</span> Tis_Service_LiveDocx_MailMerge<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'myUsername'</span>, <span style="color: #ff0000;">'myPassword'</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>to:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="php"><span style="color: #008080; font-style: italic;">// correct - do use</span>
<span style="color: #0000ff;">$mailMerge</span> = <span style="color: #000000; font-weight: bold;">new</span> Zend_Service_LiveDocx_MailMerge<span style="color: #66cc66;">&#40;</span>
    <span style="color: #000066;">array</span> <span style="color: #66cc66;">&#40;</span>
        <span style="color: #ff0000;">'username'</span> =&gt; <span style="color: #ff0000;">'myUsername'</span>,
        <span style="color: #ff0000;">'password'</span> =&gt; <span style="color: #ff0000;">'myPassword'</span>
    <span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #008080; font-style: italic;">// alternatively</span>
<span style="color: #0000ff;">$mailMerge</span> = <span style="color: #000000; font-weight: bold;">new</span> Zend_Service_LiveDocx_MailMerge<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0000ff;">$mailMerge</span>-&gt;<span style="color: #006600;">setUsername</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'myUsername'</span><span style="color: #66cc66;">&#41;</span>
          -&gt;<span style="color: #006600;">setPassword</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'myPassword'</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>I would encourage you to update your projects to use the <em>Zend_Service_LiveDocx</em> family of classes.</p>
<p>If you need any assistance in migrating your code, please post a support request into the <a href="http://www.phplivedocx.org/support/">support forum</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phplivedocx.org/2010/01/21/migrating-from-tis_-to-zend_service_livedocx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LiveDocx is now in Zend Framework 1.10.0b1</title>
		<link>http://www.phplivedocx.org/2010/01/21/livedocx-is-now-in-zend-framework-1-10-0-beta-1/</link>
		<comments>http://www.phplivedocx.org/2010/01/21/livedocx-is-now-in-zend-framework-1-10-0-beta-1/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 06:52:08 +0000</pubDate>
		<dc:creator>Jonathan Maron</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.phplivedocx.org/?p=1126</guid>
		<description><![CDATA[You can now download the first beta version of the Zend Framework that contains Zend_Service_LiveDocx. The final stable version will be released in the next few days. Please go to the download section of ZendFramework.com and download Zend Framework 1.10.0 Beta 1 Full. The paths to the demonstration applications and documentation remain the same as [...]]]></description>
			<content:encoded><![CDATA[<p>You can now download the first beta version of the Zend Framework that contains <em>Zend_Service_LiveDocx</em>. The final stable version will be released in the next few days.</p>
<p>Please go to the <a href="http://www.zendframework.com/download/latest">download section</a> of ZendFramework.com and download <em>Zend Framework 1.10.0 Beta 1 Full</em>.</p>
<p>The paths to the demonstration applications and documentation remain the same as listed in the <a href="http://www.phplivedocx.org/2009/12/03/migrated-to-zend-framework-standard-trunk/">previous post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phplivedocx.org/2010/01/21/livedocx-is-now-in-zend-framework-1-10-0-beta-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LiveDocx is now in Zend Framework 1.10 Alpha</title>
		<link>http://www.phplivedocx.org/2010/01/02/livedocx-is-now-in-zend-framework-1-10-alpha/</link>
		<comments>http://www.phplivedocx.org/2010/01/02/livedocx-is-now-in-zend-framework-1-10-alpha/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 07:19:20 +0000</pubDate>
		<dc:creator>Jonathan Maron</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.phplivedocx.org/?p=1121</guid>
		<description><![CDATA[You can now download the first alpha version of the Zend Framework that contains Zend_Service_LiveDocx. The final stable version is marked for release on January 26, 2010. Please go to the download section of ZendFramework.com and download Zend Framework 1.10.0 Alpha Full. The paths to the demonstration applications and documentation remain the same as listed [...]]]></description>
			<content:encoded><![CDATA[<p>You can now download the first alpha version of the Zend Framework that contains <em>Zend_Service_LiveDocx</em>. The final stable version is marked for release on January 26, 2010.</p>
<p>Please go to the <a href="http://www.zendframework.com/download/latest">download section</a> of ZendFramework.com and download <em> Zend Framework 1.10.0 Alpha Full</em>.</p>
<p>The paths to the demonstration applications and documentation remain the same as listed in the <a href="http://www.phplivedocx.org/2009/12/03/migrated-to-zend-framework-standard-trunk/">previous post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phplivedocx.org/2010/01/02/livedocx-is-now-in-zend-framework-1-10-alpha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrated to Zend Framework Standard Trunk</title>
		<link>http://www.phplivedocx.org/2009/12/03/migrated-to-zend-framework-standard-trunk/</link>
		<comments>http://www.phplivedocx.org/2009/12/03/migrated-to-zend-framework-standard-trunk/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 15:03:43 +0000</pubDate>
		<dc:creator>Jonathan Maron</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.phplivedocx.org/?p=1083</guid>
		<description><![CDATA[In the next step of phpLiveDocx becoming a part of the official Zend Framework distribution file, I am delighted to announce that the code has now arrived in the Zend Framework Standard Trunk repository. This is the last step before it becomes part of the distribution file. Using Subversion (SVN) you can anonymously checkout the [...]]]></description>
			<content:encoded><![CDATA[<p>In the next step of phpLiveDocx becoming a part of the official <a href="http://www.zendframework.com">Zend Framework</a> <a href="http://www.zendframework.com/download/current/">distribution file</a>, I am delighted to announce that the code has now arrived in the Zend Framework <strong>Standard Trunk</strong> repository. This is the last step before it becomes part of the distribution file.</p>
<p>Using Subversion (SVN) you can anonymously checkout the <strong>Standard Trunk</strong> repository:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">svn checkout http://framework.zend.com/svn/framework/standard/trunk/ ./</pre></div></div>

<p>You can find <em>Zend_Service_LiveDocx_*</em> at the following locations:</p>
<h3>Source code</h3>

<div class="wp_syntax"><div class="code"><pre class="bash">/library/Zend/Service/LiveDocx.php
/library/Zend/Service/LiveDocx/MailMerge.php
/library/Zend/Service/LiveDocx/Exception.php</pre></div></div>

<h3>Unit tests</h3>

<div class="wp_syntax"><div class="code"><pre class="bash">/tests/Zend/Service/LiveDocx/LiveDocxTest.php
/tests/Zend/Service/LiveDocx/MailMergeTest.php
/tests/Zend/Service/LiveDocx/MailMerge/*</pre></div></div>

<h3>End-User documentation (as raw XML)</h3>

<div class="wp_syntax"><div class="code"><pre class="bash">/documentation/manual/en/module_specs/Zend_Service_LiveDocx.xml
/documentation/manual/en/figures/zend.service.livedocx.*</pre></div></div>

<h3>Demonstration applications</h3>

<div class="wp_syntax"><div class="code"><pre class="bash">/demos/Zend/Service/LiveDocx/*</pre></div></div>

<p>Learn more about the Zend Framework repository in the <a href="http://framework.zend.com/wiki/display/ZFDEV/Subversion+Standards">official wiki</a>.</p>
<p>I would like to thank <em>Matthew Weier O&#8217;Phinney</em>, Zend Framework Project Lead for promoting <em>Zend_Service_LiveDocx</em> to the <strong>Standard Trunk</strong> repository.</p>
<p>The next and final step will be <em>Zend_Service_LiveDocx</em> becoming part of the Zend Framework 1.10 distribution file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phplivedocx.org/2009/12/03/migrated-to-zend-framework-standard-trunk/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Generating 1000s of concatenated documents</title>
		<link>http://www.phplivedocx.org/2009/11/04/generating-1000s-of-concatenated-documents/</link>
		<comments>http://www.phplivedocx.org/2009/11/04/generating-1000s-of-concatenated-documents/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 10:09:08 +0000</pubDate>
		<dc:creator>Jonathan Maron</dc:creator>
				<category><![CDATA[Samples]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.phplivedocx.org/?p=1063</guid>
		<description><![CDATA[There are applications in which thousands of populated templates need to be concatenated into one PDF file. Consider, for example, the case of a telephone company, wishing to generate an invoice for all its customers. Such a scenario can be split up into two separate and distinct processes: invoice generation and invoice printing. LiveDocx is [...]]]></description>
			<content:encoded><![CDATA[<p>There are applications in which thousands of populated templates need to be concatenated into one PDF file. Consider, for example, the case of a telephone company, wishing to generate an invoice for all its customers. Such a scenario can be split up into two separate and distinct processes: <em>invoice generation</em> and <em>invoice printing</em>.</p>
<p>LiveDocx is the tool of choice for the invoice generation process. But how do you efficiently get a printed copy of the invoices to the customer? One way would be to concatenate all the created invoices into one massive PDF file and then dispatch this PDF file to the printers.</p>
<h3>Backend concatenation</h3>
<p>As of LiveDocx 1.2, it has been possible to assign multiple records in the form of a nested associative array to a template. The result is one concatenated document, containing the populated template (one per nested sub-array).</p>
<p>This backend concatenation approach is a fantastic way to create hundreds of documents in one run, but in the case that your application demands thousands or even tens of thousands of documents, the amount of data that has be transfered via SOAP in one request does get extremely large and depending upon your Internet connection, can become a little slow and consequently burdensome.</p>
<p>This blog post offers a new approach to generate documents using LiveDocx on the backend, but perform the concatenation locally. The following screenshot illustrates the sample application in action (click to zoom):</p>
<p style="background-color:#000000;"><a href="http://www.phplivedocx.org/wp-content/uploads/2009/11/livedocx-local-concatenation_zoom.png"><img src="http://www.phplivedocx.org/wp-content/uploads/2009/11/livedocx-local-concatenation.png" /></a></p>
<p>The code has been written for the official <em>Zend_Service_LiveDocx_MailMerge</em> component, which is currently in the <a href="http://www.phplivedocx.org/2009/12/03/migrated-to-zend-framework-standard-trunk/">Standard Trunk</a>. By modifying the constructor, however, you can easily make it work with <em>Tis_Service_Service_MailMerge</em>.</p>
<h3>Generate remotely, concatenate locally</h3>
<p>In the sample application, documents are created by the backend LiveDocx server and concatenated locally, using either <a href="http://www.accesspdf.com/pdftk/">pdftk</a> or <a href="http://pages.cs.wisc.edu/~ghost/">Ghostscript</a> in the function <em>concatenatePdfFilenames()</em>. This approach has the advantage that only the singular documents are transfered from the backend LiveDocx service via SOAP to the server and not the entire concatenated document, which theoretically can be many gigabytes in size. The disadvantage, of course, is that one or these tools must be installed on the local server. However, as both are open source and available for Windows and Linux, this should not pose such a problem. Often they will already be installed on your server.</p>
<p>If both <a href="http://www.accesspdf.com/pdftk/">pdftk</a> and <a href="http://pages.cs.wisc.edu/~ghost/">Ghostscript</a> are available, it is recommended to use <a href="http://www.accesspdf.com/pdftk/">pdftk</a>, as it is considerably faster and uses less memory. <a href="http://pages.cs.wisc.edu/~ghost/">Ghostscript</a>, on the other hand, generates slightly small PDF files.</p>
<h3>Try it out yourself</h3>
<p>The source code to this sample application is located at <em>/demos/Zend/Service/LiveDocx/MailMerge/license-agreement/generate-document-concat.php</em> of the <a href="http://www.phplivedocx.org/2009/12/03/migrated-to-zend-framework-standard-trunk/">Standard Trunk</a>. Simply checkout the entire repository or update your local working copy. If you are just curious about what the code looks like, you can view the source code here: <a href="http://framework.zend.com/svn/framework/standard/trunk/demos/Zend/Service/LiveDocx/MailMerge/license-agreement/generate-document-concat.php">generate-document-concat.php</a>.</p>
<p>If you have any questions about this local concatenation approach, please post into the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phplivedocx.org/2009/11/04/generating-1000s-of-concatenated-documents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

