You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ms...@apache.org on 2015/10/28 11:51:11 UTC

svn commit: r1710987 - /pdfbox/cmssite/branches/jekyll-migration/content/2.0/migration.md

Author: msahyoun
Date: Wed Oct 28 10:51:10 2015
New Revision: 1710987

URL: http://svn.apache.org/viewvc?rev=1710987&view=rev
Log:
PDFBOX-3063, PDFBOX-3030: info about getting color for text in PDFTextStripper

Modified:
    pdfbox/cmssite/branches/jekyll-migration/content/2.0/migration.md

Modified: pdfbox/cmssite/branches/jekyll-migration/content/2.0/migration.md
URL: http://svn.apache.org/viewvc/pdfbox/cmssite/branches/jekyll-migration/content/2.0/migration.md?rev=1710987&r1=1710986&r2=1710987&view=diff
==============================================================================
--- pdfbox/cmssite/branches/jekyll-migration/content/2.0/migration.md (original)
+++ pdfbox/cmssite/branches/jekyll-migration/content/2.0/migration.md Wed Oct 28 10:51:10 2015
@@ -122,6 +122,25 @@ if (job.printDialog()) {
 
 Advanced use case examples can be found in th examples package under org/apache/pdfbox/examples/printing/Printing.java
 
+### Text Extraction
+``PDFTextStripper`` no longer sets the color information in the ``PDGraphicsState ``. If you need color information for the text being processed
+you can extend ``PDFTextStripper``and add the following ``Operators`` to the constructor:
+
+~~~java
+addOperator(new SetStrokingColorSpace());
+addOperator(new SetNonStrokingColorSpace());
+addOperator(new SetStrokingDeviceCMYKColor());
+addOperator(new SetNonStrokingDeviceCMYKColor());
+addOperator(new SetNonStrokingDeviceRGBColor());
+addOperator(new SetStrokingDeviceRGBColor());
+addOperator(new SetNonStrokingDeviceGrayColor());
+addOperator(new SetStrokingDeviceGrayColor());
+addOperator(new SetStrokingColor());
+addOperator(new SetStrokingColorN());
+addOperator(new SetNonStrokingColor());
+addOperator(new SetNonStrokingColorN());
+~~~
+
 ### Interactive Forms
 Large parts of the support for interactive forms (AcroForms) has been rewritten. The most notable change from 1.8.x is that
 there is a clear distinction between fields and the annotations representing them visually. Intermediate nodes in a field