pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r970484 - /websites/production/pdfbox/content/2.0/migration.html
Date Wed, 28 Oct 2015 10:51:37 GMT
Author: msahyoun
Date: Wed Oct 28 10:51:37 2015
New Revision: 970484

Log:
Site checkin for project Apache PDFBox Website

Modified:
    websites/production/pdfbox/content/2.0/migration.html

Modified: websites/production/pdfbox/content/2.0/migration.html
==============================================================================
--- websites/production/pdfbox/content/2.0/migration.html (original)
+++ websites/production/pdfbox/content/2.0/migration.html Wed Oct 28 10:51:37 2015
@@ -285,6 +285,23 @@ and so on. The <code>add</code> method n
 </code></pre></div>
 <p>Advanced use case examples can be found in th examples package under org/apache/pdfbox/examples/printing/Printing.java</p>
 
+<h3 id="text-extraction">Text Extraction</h3>
+
+<p><code>PDFTextStripper</code> no longer sets the color information in
the <code>PDGraphicsState</code>. If you need color information for the text being
processed
+you can extend <code>PDFTextStripper</code>and add the following <code>Operators</code>
to the constructor:</p>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span
class="n">addOperator</span><span class="o">(</span><span class="k">new</span>
<span class="nf">SetStrokingColorSpace</span><span class="o">());</span>
+<span class="n">addOperator</span><span class="o">(</span><span
class="k">new</span> <span class="nf">SetNonStrokingColorSpace</span><span
class="o">());</span>
+<span class="n">addOperator</span><span class="o">(</span><span
class="k">new</span> <span class="nf">SetStrokingDeviceCMYKColor</span><span
class="o">());</span>
+<span class="n">addOperator</span><span class="o">(</span><span
class="k">new</span> <span class="nf">SetNonStrokingDeviceCMYKColor</span><span
class="o">());</span>
+<span class="n">addOperator</span><span class="o">(</span><span
class="k">new</span> <span class="nf">SetNonStrokingDeviceRGBColor</span><span
class="o">());</span>
+<span class="n">addOperator</span><span class="o">(</span><span
class="k">new</span> <span class="nf">SetStrokingDeviceRGBColor</span><span
class="o">());</span>
+<span class="n">addOperator</span><span class="o">(</span><span
class="k">new</span> <span class="nf">SetNonStrokingDeviceGrayColor</span><span
class="o">());</span>
+<span class="n">addOperator</span><span class="o">(</span><span
class="k">new</span> <span class="nf">SetStrokingDeviceGrayColor</span><span
class="o">());</span>
+<span class="n">addOperator</span><span class="o">(</span><span
class="k">new</span> <span class="nf">SetStrokingColor</span><span
class="o">());</span>
+<span class="n">addOperator</span><span class="o">(</span><span
class="k">new</span> <span class="nf">SetStrokingColorN</span><span
class="o">());</span>
+<span class="n">addOperator</span><span class="o">(</span><span
class="k">new</span> <span class="nf">SetNonStrokingColor</span><span
class="o">());</span>
+<span class="n">addOperator</span><span class="o">(</span><span
class="k">new</span> <span class="nf">SetNonStrokingColorN</span><span
class="o">());</span>
+</code></pre></div>
 <h3 id="interactive-forms">Interactive Forms</h3>
 
 <p>Large parts of the support for interactive forms (AcroForms) has been rewritten.
The most notable change from 1.8.x is that



Mime
View raw message