pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1710987 - /pdfbox/cmssite/branches/jekyll-migration/content/2.0/migration.md
Date Wed, 28 Oct 2015 10:51:11 GMT
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 



Mime
View raw message