<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Kouhei Sutou <kou****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2014-02-16 22:52:41 +0900 (Sun, 16 Feb 2014)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1">d6cefcf01717126b2eed02e023cc2dfb04a011c1</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">Add new line between page</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#diff-0">lib/chupa-text/decomposers/pdf.rb</a></li>
<li><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#diff-1">test/test-pdf.rb</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/chupa-text/decomposers/pdf.rb (+4 -1)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0L31">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0L32">32</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0L33">33</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0L34">34</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0L35">35</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0L36">36</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0L37">37</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0L38">38</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0R31">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0R32">32</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0R33">33</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0R34">34</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0R35">35</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0R36">36</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0R37">37</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0R38">38</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0R39">39</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0R40">40</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L0R41">41</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -32,7 +32,10 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">module ChupaText</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> document = Poppler::Document.new(data.body)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> text = ""</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> document.each do |page|</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- text << page.get_text</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ page_text = page.get_text</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ next if page_text.empty?</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ text << "\n" unless text.empty?</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ text << page_text</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> end</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> text_data = TextData.new(text)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> text_data.uri = data.uri</span>
</pre>
</td>
</tr>
</tbody>
</table>
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: test/test-pdf.rb (+1 -1)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1L124">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1L125">125</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1L126">126</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1L127">127</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1L128">128</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1L129">129</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1L130">130</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1L131">131</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1R124">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1R125">125</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1R126">126</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1R127">127</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1R128">128</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1R129">129</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1R130">130</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/ranguba/chupa-text-decomposer-pdf/commit/d6cefcf01717126b2eed02e023cc2dfb04a011c1#L1R131">131</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -125,7 +125,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">class TestPDF < Test::Unit::TestCase</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> sub_test_case("multi pages") do</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> def test_body</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- assert_equal(["Page1Page2"], decompose.collect(&:body))</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ assert_equal(["Page1\nPage2"], decompose.collect(&:body))</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> end</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> private</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>