<?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>Wanderwort &#187; Arbeit</title>
	<atom:link href="http://wanderwort.de/tag/arbeit/feed/" rel="self" type="application/rss+xml" />
	<link>http://wanderwort.de</link>
	<description>Interkulturelle Wortkolletionen in Ruby, PHP, XHTML, CSS nah am Strom der Gesellschaft</description>
	<lastBuildDate>Tue, 13 Jul 2010 11:58:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>InDesign: Sprache für ganzes Dokument ändern</title>
		<link>http://wanderwort.de/2010/03/08/indesign-sprache-fur-ganzes-dokument-andern/</link>
		<comments>http://wanderwort.de/2010/03/08/indesign-sprache-fur-ganzes-dokument-andern/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 14:37:57 +0000</pubDate>
		<dc:creator>pex</dc:creator>
				<category><![CDATA[Gemachtes]]></category>
		<category><![CDATA[Arbeit]]></category>
		<category><![CDATA[InDesign]]></category>

		<guid isPermaLink="false">http://wanderwort.de/?p=262</guid>
		<description><![CDATA[Es gibt zwei Möglichkeiten die Sprache für das Text- und Absatzformat in InDesign zu ändern. Wenn wir allerdings nicht für jedes Textfeld die Sprache ändern wollen, müssen wir uns eines Workarounds bedienen. Schließlich gibt es kein &#8220;Sprache für Dokument ändern&#8221;. Dann wollen wir mal: Wir gehen in unser Menü: Bearbeiten -> Suchen/Ersetzen (bzw. MacOS: ⌘+F, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/2010/03/08/indesign-sprache-fur-ganzes-dokument-andern/"><img src="http://www.adobe.com/accessibility/products/indesign/images/indesign_cs4_150x150.jpg" alt="InDesign" style="float: left;margin: 0 10px 10px 0"/></a> Es gibt zwei Möglichkeiten die Sprache für das Text- und Absatzformat in InDesign zu ändern. Wenn wir allerdings nicht für jedes Textfeld die Sprache ändern wollen, müssen wir uns eines Workarounds bedienen. Schließlich gibt es kein &#8220;Sprache für Dokument ändern&#8221;. Dann wollen wir mal:<br />
<span id="more-262"></span>Wir gehen in unser Menü: Bearbeiten -> Suchen/Ersetzen<br />
(bzw. MacOS: ⌘+F, Windows: CTRL+F)</p>
<p><img src="http://wanderwort.de/wp-content/uploads/2010/03/4erweiterte-optionen.png" alt="" title="4erweiterte-optionen" width="569" height="448" class="alignnone size-full wp-image-263" /></p>
<p>Man bediene sich der erweiterten Suchoptionen und kommt so zur nächsten Ansicht:</p>
<p><img src="http://wanderwort.de/wp-content/uploads/2010/03/5sprache-auswaehlen2.png" alt="" title="5sprache-auswaehlen" width="600" height="343" class="alignnone size-full wp-image-271" /></p>
<p>Nun wählen wir für die Suchoption unsere zu ersetzende Sprache aus, die im Dokument geführt wird. Die Auswahl wird mit OK bestätigt und im nächsten Schritt geben wir für das Ersetzen die Zielsprache auf die gleiche Weise ein. Wenn alles richtig lief, sieht das Suchen/Ersetzen-Fenster nun so aus:</p>
<p><img src="http://wanderwort.de/wp-content/uploads/2010/03/6optionen-ausgefuellt.png" alt="" title="6optionen-ausgefuellt" width="569" height="448" class="alignnone size-full wp-image-265" /></p>
<p>Wunderbar. Um das ganze Dokument zu ändern, muss bei &#8220;Durchsuchen&#8221; auch &#8220;Dokument&#8221; eingestellt sein!<br />
Mit &#8220;Alle ändern&#8221; stellen wir nun unser Dokument auf die neue Sprache um. </p>
<p>In allen Textfelder sollte nun, wenn wir das Textwerkzeug (T) benutzen, in den Optionen die neue Sprache erscheinen:</p>
<p><img src="http://wanderwort.de/wp-content/uploads/2010/03/2sprachauswahl.png" alt="" title="2sprachauswahl" width="600" height="45" class="alignnone size-full wp-image-275" /></p>
]]></content:encoded>
			<wfw:commentRss>http://wanderwort.de/2010/03/08/indesign-sprache-fur-ganzes-dokument-andern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cheatsheet: moving data from one server to another</title>
		<link>http://wanderwort.de/2010/01/20/moving-data-from-one-server-to-another/</link>
		<comments>http://wanderwort.de/2010/01/20/moving-data-from-one-server-to-another/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 06:00:11 +0000</pubDate>
		<dc:creator>pex</dc:creator>
				<category><![CDATA[Gemachtes]]></category>
		<category><![CDATA[Arbeit]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://wanderwort.de/?p=217</guid>
		<description><![CDATA[This article is about moving a running web-environment along with it&#8217;s MySQL database from one server to another via SSH. Compress files Let&#8217;s compress the directory we&#8217;re going to move using gzip: tar cfvz backup.tar.gz /path/ Dump MySQL database content mysqldump -uUser -p -hlocalhost database_name &#62; dump.sql You can also dump several databases with mysqldump [...]]]></description>
			<content:encoded><![CDATA[<p>This article is about moving a running web-environment along with it&#8217;s <a href="http://en.wikipedia.org/wiki/MySQL">MySQL</a> database from one server to another via <a href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a>.</p>
<h3>Compress files</h3>
<p>Let&#8217;s compress the directory we&#8217;re going to move using <a href="http://en.wikipedia.org/wiki/Gzip">gzip</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> cfvz backup.tar.gz <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

</p>
<h3>Dump MySQL database content</h3>
<p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">-uUser</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-hlocalhost</span> database_name <span style="color: #000000; font-weight: bold;">&gt;</span> dump.sql</pre></div></div>

<p>You can also dump several databases with <a href="http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html">mysqldump</a> by addind the <code>--databases</code> or <code>--all-databases</code> parameter.</p>
<h3>Moving files</h3>
<p>Now we use <a href="http://en.wikipedia.org/wiki/Secure_Copy">SCP</a> to move files to our new machine. The following example copies from the old machine:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> user<span style="color: #000000; font-weight: bold;">@</span>host:<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>backup.tar.gz .</pre></div></div>

<p>The other way round, copying the file to the new machine from the old one would look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> backup.tar.gz user<span style="color: #000000; font-weight: bold;">@</span>host:<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>backup.tar.gz</pre></div></div>

<p>Do the same with your database dump.
</p>
<h3>Uncompress files</h3>
<p>Simply type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> xfvz backup.tar.gz</pre></div></div>

<p>Now we should have the same directory structure we had on our old machine.</p>
<h3>Import MySQL database</h3>
<p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-uUser</span> <span style="color: #660033;">--default-character-set</span>=utf8 <span style="color: #660033;">-hlocalhost</span> <span style="color: #660033;">-p</span> database_name <span style="color: #000000; font-weight: bold;">&lt;</span> dump.sql</pre></div></div>

<p>If you have international content and an utf-8 environment running don&#8217;t forget to pass the charset-parameter!</p>
]]></content:encoded>
			<wfw:commentRss>http://wanderwort.de/2010/01/20/moving-data-from-one-server-to-another/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>select any HTML text in element with jQuery</title>
		<link>http://wanderwort.de/2009/11/19/select-any-html-text-in-element-with-jquery/</link>
		<comments>http://wanderwort.de/2009/11/19/select-any-html-text-in-element-with-jquery/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 15:25:44 +0000</pubDate>
		<dc:creator>pex</dc:creator>
				<category><![CDATA[Gemachtes]]></category>
		<category><![CDATA[Arbeit]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://wanderwort.de/?p=170</guid>
		<description><![CDATA[The following script jQuery extension selects any text from a given jQuery selector. Tested with Firefox and Safari &#8211; should work in IE6+ as well. jQuery.fn.extend&#40;&#123; selectText: function&#40;&#41; &#123; var text = $&#40;this&#41;&#91;0&#93;; if &#40;$.browser.msie&#41; &#123; var range = document.body.createTextRange&#40;&#41;; range.moveToElementText&#40;text&#41;; range.select&#40;&#41;; &#125; else if &#40;$.browser.mozilla &#124;&#124; $.browser.opera&#41; &#123; var selection = window.getSelection&#40;&#41;; var range [...]]]></description>
			<content:encoded><![CDATA[<p>The following <del datetime="2009-11-19T15:26:12+00:00">script</del> <ins datetime="2009-11-19T15:26:37+00:00">jQuery extension</ins> selects any text from a given jQuery selector. Tested with Firefox and Safari &#8211; should work in IE6+ as well.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery.<span style="color: #660066;">fn</span>.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
  selectText<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> text <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">msie</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #003366; font-weight: bold;">var</span> range <span style="color: #339933;">=</span> document.<span style="color: #660066;">body</span>.<span style="color: #660066;">createTextRange</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      range.<span style="color: #660066;">moveToElementText</span><span style="color: #009900;">&#40;</span>text<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      range.<span style="color: #660066;">select</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">mozilla</span> <span style="color: #339933;">||</span> $.<span style="color: #660066;">browser</span>.<span style="color: #660066;">opera</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #003366; font-weight: bold;">var</span> selection <span style="color: #339933;">=</span> window.<span style="color: #660066;">getSelection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #003366; font-weight: bold;">var</span> range <span style="color: #339933;">=</span> document.<span style="color: #660066;">createRange</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      range.<span style="color: #660066;">selectNodeContents</span><span style="color: #009900;">&#40;</span>text<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      selection.<span style="color: #660066;">removeAllRanges</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      selection.<span style="color: #660066;">addRange</span><span style="color: #009900;">&#40;</span>range<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">safari</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #003366; font-weight: bold;">var</span> selection <span style="color: #339933;">=</span> window.<span style="color: #660066;">getSelection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      selection.<span style="color: #660066;">setBaseAndExtent</span><span style="color: #009900;">&#40;</span>text<span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> text<span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">return</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>To use it simly do:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> shortSelector <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#name'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">selectText</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> longSelector <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul#names li:contains(&quot;Hampel&quot;)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">selectText</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>written on top of <a href="http://stackoverflow.com/questions/985272/jquery-selecting-text-in-an-element-akin-to-highlighting-with-your-mouse">Source</a> and <a href="http://www.codingforums.com/archive/index.php/t-105808.html">Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wanderwort.de/2009/11/19/select-any-html-text-in-element-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML to PDF Library for PHP 5</title>
		<link>http://wanderwort.de/2009/07/08/html-to-pdf-library-for-php-5/</link>
		<comments>http://wanderwort.de/2009/07/08/html-to-pdf-library-for-php-5/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 19:06:14 +0000</pubDate>
		<dc:creator>pex</dc:creator>
				<category><![CDATA[Gemachtes]]></category>
		<category><![CDATA[Arbeit]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://wanderwort.de/?p=138</guid>
		<description><![CDATA[As I had to build a simple html to pdf converting for a client using php, I found a beautiful library called DOMPDF written by Benj Carson. It seemed to be very lightweight and uncomplicated, which turned out to be true. In a standard case it really is as simple as $pdf-&#62;load_html&#40;$html&#41;; I am going [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wanderwort.de/2009/07/08/html-to-pdf-library-for-php-5/"><img src="http://wanderwort.de/wp-content/uploads/2009/07/dompdf_simple.png" alt="DomPDF HTML to PDF" title="dompdf_simple" width="200" height="76" class="size-full wp-image-146" style="float: left; margin: 0 15px 5px 0" /></a> As I had to build a simple html to pdf converting for a client using php, I found a <a href="http://www.digitaljunkies.ca/dompdf/">beautiful library called DOMPDF</a> written by Benj Carson.</p>
<p>It seemed to be very lightweight and uncomplicated, which turned out to be true. In a standard case it really is as simple as</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$pdf</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load_html</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$html</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I am going to talk about the basic usage and problems I had to solve, specially with umlauts / non latin characters.<br />
<span id="more-138"></span></p>
<h3>Basic Usage</h3>
<p>To initiate an environment you just create a new instance of the given class.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#path-to-your-installation#/dompdf/dompdf_config.inc.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$pdf</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load_html</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#some-html#'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$pdf</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">render</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$pdf</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">stream</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'some-file.pdf'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Further information about the basic usage of the class can be found on the <a href="http://www.digitaljunkies.ca/dompdf/usage.php">project page</a>. I am only using it inline PHP.</p>
<h3>Convert your CSS styled HTML</h3>
<p>Now you have to feed the method load_html with some html. Therefore we build a whole, simple page including as stylesheet (css). One of the most important things about this class is, that you simply link to a css file and dompdf parses and uses it to style your pdf.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;some-css.css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Your Content<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>Please notice that dompdf neither supports absolute positioning nor floating. Therefor we have to use backgound-image-position to position images. Remember not to use the short-form &#8220;background&#8221; as this isn&#8217;t supported neither.</p>
<h3>Fixing White-Spaces</h3>
<p>I had the problem of wrong white-spaces respectively line-breaks because I had to convert a german document. tommylacroix found <a href="http://www.dashinteractive.net/dompdf/index.php?v=3153736">a solution</a> that worked perfectly for me.<br />
You have to go into your text_frame_decorator.cls.php around line 127 and replace</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #000000; font-weight: bold;">function</span> split_text<span style="color: #009900;">&#40;</span><span style="color: #000088;">$offset</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$offset</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span>
      <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$split</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_frame<span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_node</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">splitText</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$offset</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$deco</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">copy</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$split</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>by</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #000000; font-weight: bold;">function</span> split_text<span style="color: #009900;">&#40;</span><span style="color: #000088;">$offset</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$offset</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span>
      <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_frame<span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_node</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$split</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_frame<span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_node</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">splitText</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$offset</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_frame<span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_node</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mb_substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$offset</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$split</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mb_substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #339933;">,</span><span style="color: #000088;">$offset</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$deco</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">copy</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$split</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Using inline PHP embedded in HTML</h3>
<p>Last but not least there are several more options to manipulate the rendered pdf file. By adding some inline php code in your html we can manage to display page numbers, a header or footer, watermarks, etc.</p>
<p>To add page numbers to your pdf, we add the following code to our html:<br/> (I explained the usage in comments)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/php&quot;</span><span style="color: #339933;">&gt;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pdf</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #666666; font-style: italic;">## Setup a tiny configuration ##
</span>      <span style="color: #000088;">$text_height</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">17</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$text_size</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$font</span> <span style="color: #339933;">=</span> Font_Metrics<span style="color: #339933;">::</span><span style="color: #004000;">get_font</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;helvetica&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;normal&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">## Get the dimensions of our pdf-file ##
</span>      <span style="color: #000088;">$dimensions</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;width&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$pdf</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;height&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$pdf</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">## The Counter-Text with variables: ##
</span>      <span style="color: #000088;">$pageCounterText</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Page: {PAGE_NUM} of {PAGE_COUNT}&quot;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">## If you want to position the Counter on the right, you need the text-width: ##
</span>      <span style="color: #000088;">$pageCounterWidth</span> <span style="color: #339933;">=</span> Font_Metrics<span style="color: #339933;">::</span><span style="color: #004000;">get_text_width</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pageCounterText</span><span style="color: #339933;">,</span> <span style="color: #000088;">$font</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text_size</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">## Not we can add this to our pdf:
</span>      <span style="color: #000088;">$pdf</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">page_text</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$dimensions</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;height&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-</span><span style="color: #000088;">$text_height</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pageCounterText</span><span style="color: #339933;">,</span> <span style="color: #000088;">$font</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text_size</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></pre></div></div>

<p>The page_text method works like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  page_text<span style="color: #009900;">&#40;</span>float <span style="color: #000088;">$x</span><span style="color: #339933;">,</span> float <span style="color: #000088;">$y</span><span style="color: #339933;">,</span> string <span style="color: #000088;">$text</span><span style="color: #339933;">,</span> string <span style="color: #000088;">$font</span><span style="color: #339933;">,</span> float <span style="color: #000088;">$size</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span> <span style="color: #000088;">$color</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">## Explanation: ##
</span>    <span style="color: #000088;">$x</span><span style="color: #339933;">:</span> Position from the top
    <span style="color: #000088;">$y</span><span style="color: #339933;">:</span> Position from the left
    <span style="color: #000088;">$size</span><span style="color: #339933;">:</span> Font<span style="color: #339933;">-</span>Size
    <span style="color: #000088;">$color</span><span style="color: #339933;">:</span> an rgb<span style="color: #339933;">-</span><span style="color: #990000;">array</span> <span style="color: #339933;">-&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>R<span style="color: #339933;">,</span> G<span style="color: #339933;">,</span> B<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span>optional<span style="color: #009900;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://wanderwort.de/2009/07/08/html-to-pdf-library-for-php-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TalentRun startet heute</title>
		<link>http://wanderwort.de/2007/12/17/talentrun-startet-heute/</link>
		<comments>http://wanderwort.de/2007/12/17/talentrun-startet-heute/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 11:24:31 +0000</pubDate>
		<dc:creator>pex</dc:creator>
				<category><![CDATA[Gemachtes]]></category>
		<category><![CDATA[Arbeit]]></category>
		<category><![CDATA[TalentRun]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://wanderwort.de/2007/12/17/talentrun-startet-heute/</guid>
		<description><![CDATA[Mein neuestes Projekt in Sachen Frontend Entwicklung für die Firma TalentRun GmbH in Hamburg neigt sich seinem Ende und ist heute als Beta für Freunde und Tester auf talentrun.de online gegangen. Aktuelle Infos findet Ihr zum Beispiel im Videointerview mit Gruenderszene.de auf Sevenload oder in der letzten Pressemeldung der GEMA Wer die Plattform testen möchte, [...]]]></description>
			<content:encoded><![CDATA[<p>Mein neuestes Projekt in Sachen Frontend Entwicklung für die Firma TalentRun GmbH in Hamburg neigt sich seinem Ende und ist heute als Beta für Freunde und Tester auf <a href="http://www.talentrun.de">talentrun.de</a> online gegangen.</p>
<p>Aktuelle Infos findet Ihr zum Beispiel im Videointerview mit <a href="http://de.sevenload.com/videos/bEsnKI1/talentrun">Gruenderszene.de auf Sevenload</a> oder in der letzten <a href="http://www.gema.de/presse/pressemitteilungen/pressemitteilung/?tx_ttnews[tt_news]=676&#038;tx_ttnews[backPid]=76&#038;cHash=518141f71c">Pressemeldung der GEMA</a></p>
<p>Wer die Plattform testen möchte, kann sich natürlich gern melden und seine Freischaltung beschleunigen.<br />
Anbei noch eine kleine Beschreibung der Grundidee der Karaoke-Plattform..<br />
<span id="more-10"></span></p>
<p>Singstar hat den Weg bereitet und nun können Karaoke-Begeisterte sogar kostenlos und ohne teure Hardware zum Sternchen werden. Das Portal <strong>www.TalentRun.de </strong>bietet seinen Usern in drei Hauptbereichen alles, was das Web 2.0-Herz begehrt.</p>
<p>Im Bereich <strong>„Singen &amp; Aufnehmen“</strong> sind der stimmlichen Kreativität keine Grenzen gesetzt. Für den User steht eine große Auswahl an bekannten Songs bereit. Einzig ein Mikrofon und Rhythmusgefühl benötigt das Talent, um den Text des Liedes abzulesen und zur Melodie seine Version des gewählten Liedes aufzunehmen. Die Flash-Applikation ist einfach und intuitiv zu bedienen und wird direkt im Browser abgespielt, ein Softwaredownload ist also nicht nötig. Damit auch eine professionelle Gesamtperformance entsteht kann sogar eine Webcam angeschlossen werden. Das eigene Musikvideo ist fertig.</p>
<p>Andere User können die Aufnahmen nun im Bereich <strong>„Anhören &amp; Ansehen“</strong> bewerten und auch kommentieren. Sie können sich als Fans outen oder auch selbst von anderen Usern zum Star gekürt werden. Damit entsteht ein Gemeinschaftsgefühl der ganz besonderen Art, schnell sind neue Freundschaften geschlossen, über die Grenzen des Wohnzimmers hinaus.</p>
<p>Wer wissen will, wie gut die gesangliche Leistung im Vergleich zu anderen ist, kann sich im Bereich <strong>„Contests und Duelle“</strong> mit anderen Usern messen. Hier stehen bereits Contests bereit, an denen der User teilnehmen kann. Ihm steht allerdings auch frei, einen eigenen ins Leben zu rufen. In den privaten Contests steht die Anerkennung der Community im Vordergrund, es sind aber auch offizielle Contests geplant, bei denen die User einen Preis gewinnen können.<br />
In den USA haben sich ähnliche Plattformen bereits durchgesetzt. Der Gedanke, seine Lieblingssongs alleine oder auf einer Party mit Freunden einmal selbst performen zu können und es dann online auch immer wieder zum Ansehen bereit zu haben ist ein sehr reizvoller. In Zeiten des Web 2.0, in der die Selbstdarstellung ein zentraler Bestandteil ist, erhält die Anerkennung der Community eine mindestens eben so große Bedeutung.</p>
<p align="center"><a href="http://wanderwort.de/wp-content/uploads/2007/12/dsc00078.JPG" title="TalentRun Online Karaoke"><img src="http://wanderwort.de/wp-content/uploads/2007/12/dsc00078.thumbnail.JPG" alt="TalentRun Online Karaoke" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://wanderwort.de/2007/12/17/talentrun-startet-heute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
