<?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>Yet another web log &#187; Office</title>
	<atom:link href="http://blog.philippheckel.com/tag/office/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.philippheckel.com</link>
	<description>Life, Linux and other things</description>
	<lastBuildDate>Tue, 24 Aug 2010 05:24:45 +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>Extract text from PDF files</title>
		<link>http://blog.philippheckel.com/2009/08/09/extract-text-from-pdf-files/</link>
		<comments>http://blog.philippheckel.com/2009/08/09/extract-text-from-pdf-files/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 17:17:05 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/2009/08/09/extract-text-from-pdf-files/</guid>
		<description><![CDATA[Adobe&#8217;s Portable Document Format (PDF) has reached great popularity over the last years and is the number one format for easy document exchange. It comes with great features such as embeddable images and multimedia, but also has rather unpleasant properties. The so called Security Features represent a simple Digital Rights Management (DRM) system and allow [...]]]></description>
			<content:encoded><![CDATA[<p>Adobe&#8217;s Portable Document Format (PDF) has reached great popularity over the last years and is the number one format for easy document exchange. It comes with great features such as embeddable images and multimedia, but also has rather unpleasant properties. The so called <em>Security Features</em> represent a simple Digital Rights Management (DRM) system and allow PDF authors to restrict the file usage. Using the DRM system, authors can allow or deny actions such as printing a file, commenting or copying content.</p>
<p>Even though this is a good idea for some situations, most of the times, it&#8217;s just annoying: Collecting ideas for seminar papers or a thesis, for instance, is almost impossible without being able to Copy &amp; Paste certain paragraphs from the PDF. </p>
<p><span id="more-24"></span></p>
<p>Fortunately, Linux can solve this problem with a simple tool called <strong>pdf to text</strong>. This command line tool simply strips all text from the PDF file and saves it to a given text-file.</p>
<h3 id="toc-installation">Installation</h3>
<p>The tool is part of the package <strong>poppler-utils</strong> and can be installed via your favorite package manager, e.g. apt-get:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> poppler-utils</pre></div></div>

<h3 id="toc-extract-text-from-pdf-files">Extract text from PDF files</h3>
<p>This is also pretty simple and the man-page gives the instructions: <em>pdftotext [options] &lt;PDF&gt; [&lt;text-file&gt;]</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ pdftotext PDF-file-with-copy-and-paste-restriction.pdf</pre></div></div>

<p>In case you&#8217;d like to perform this for every PDF-file in a folder (recursive search), simple do that:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'*.pdf'</span> <span style="color: #660033;">-exec</span> pdftotext <span style="color: #ff0000;">&quot;{}&quot;</span> \;</pre></div></div>

<p>After executing the command, there will be a *.txt-file for each PDF file in the folder, &#8211; containing the plain-text of the corresponding PDF file.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2009/08/09/extract-text-from-pdf-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excel: add weekdays to date (VBA)</title>
		<link>http://blog.philippheckel.com/2008/07/29/excel-add-weekdays-to-date-vba/</link>
		<comments>http://blog.philippheckel.com/2008/07/29/excel-add-weekdays-to-date-vba/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 15:07:29 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Office]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/2008/07/29/excel-add-weekdays-to-date-vba/</guid>
		<description><![CDATA[Since many companies work with Microsoft Excel it is often necessary to be inventive in order to implement the required functionality in your worksheet. In some applications you might want to calculate a deadline date within the week, e.g. to make sure that a product or service will be delivered within a time frame of [...]]]></description>
			<content:encoded><![CDATA[<p>Since many companies work with Microsoft Excel it is often necessary to be inventive in order to implement the required functionality in your worksheet. </p>
<p>In some applications you might want to calculate a deadline date within the week, e.g. to make sure that a product or service will be delivered within a time frame of max. 10 working days. </p>
<p><span id="more-7"></span></p>
<h3 id="toc-the-vb-function">The VB function</h3>
<p>The following small function adds weekdays to a given start date and calculates a dealine date within the week (Mo &#8211; Fr):</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Function</span> AddWeekDays(StartDate <span style="color: #000080;">As</span> <span style="color: #000080;">Long</span>, Days <span style="color: #000080;">As</span> <span style="color: #000080;">Long</span>) <span style="color: #000080;">As</span> <span style="color: #000080;">Date</span>
    <span style="color: #000080;">Dim</span> i <span style="color: #000080;">As</span> <span style="color: #000080;">Long</span>
    <span style="color: #000080;">Dim</span> d <span style="color: #000080;">As</span> <span style="color: #000080;">Date</span>
&nbsp;
    d = StartDate
    i = 0
&nbsp;
    <span style="color: #000080;">While</span> i &lt; Days
        d = DateSerial(Year(d), Month(d), Day(d) + 1)
        <span style="color: #000080;">If</span> Weekday(d, vbMonday) &lt; 6 <span style="color: #000080;">Then</span>
            i = i + 1
        <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
    Wend
&nbsp;
    AddWeekDays = d
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></pre></div></div>

<h3 id="toc-sample-usage">Sample usage</h3>
<p>The function above can either be used in a spreadsheet or within a VB script.</p>
<h4 id="toc-usage-in-a-spreadsheet">Usage in a spreadsheet</h4>
<p>Here&#8217;s how you would add it to a spreadsheet, e.g. in Microsoft Excel or in OpenOffice.org Spreadsheet:</p>
<table>
<tr>
<th style="background-color: #ddd"></th>
<th style="background-color: #ddd">A</th>
<th style="background-color: #ddd">B</th>
<th style="background-color: #ddd">C</th>
</tr>
<tr>
<td style="background-color: #ddd; font-weight: bold; padding: 3px;">1</td>
<td><strong>Description</strong></td>
<td><strong>Order Date</strong></td>
<td><strong>Service Level Violation Date (T+10 days)</strong></td>
</tr>
<tr>
<td style="background-color: #ddd; font-weight: bold; padding: 3px;">2</td>
<td>10 workstations</td>
<td>27.07.2008</td>
<td>=AddWeekDays(B2,10)</td>
</tr>
<tr>
<td style="background-color: #ddd; font-weight: bold; padding: 3px;">3</td>
<td>2 multi function printers</td>
<td>27.07.2008</td>
<td>=AddWeekDays(C2,10)</td>
</tr>
</table>
<h4 id="toc-usage-in-a-vb-script">Usage in a VB script</h4>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Sub</span> TestWeekDays()
    <span style="color: #000080;">Dim</span> SLA_Violation_Date <span style="color: #000080;">As</span> <span style="color: #000080;">Date</span>
    SLA_Violation_Date = AddWeekDays(DateValue(<span style="color: #800000;">&quot;27.07.2008&quot;</span>), 10)    
&nbsp;
    <span style="color: #008000;">' Result will be 27.07.2008 + 10 Working Days = 08.08.2008
</span>    MsgBox SLA_Violation_Date
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2008/07/29/excel-add-weekdays-to-date-vba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
