pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1660451 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java
Date Tue, 17 Feb 2015 17:29:24 GMT
Author: msahyoun
Date: Tue Feb 17 17:29:24 2015
New Revision: 1660451

URL: http://svn.apache.org/r1660451
Log:
PDFBOX-2687 avoid ClassCastException when getting OutputIntents

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java?rev=1660451&r1=1660450&r2=1660451&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java
Tue Feb 17 17:29:24 2015
@@ -447,15 +447,15 @@ public class PDDocumentCatalog implement
     /**
      * Get the list of OutputIntents defined in the document.
      * 
-     * @return The list of PDOoutputIntent
+     * @return The list of PDOutputIntent
      */
     public List<PDOutputIntent> getOutputIntent () {
         List<PDOutputIntent> retval = new ArrayList<PDOutputIntent>();
-        COSArray array = (COSArray)root.getItem(COSName.OUTPUT_INTENTS);
+        COSArray array = (COSArray)root.getDictionaryObject(COSName.OUTPUT_INTENTS);
         if (array!=null) {
             for (COSBase cosBase : array)
             {
-                PDOutputIntent oi = new PDOutputIntent((COSStream)cosBase);
+                PDOutputIntent oi = new PDOutputIntent((COSDictionary)cosBase);
                 retval.add(oi);
             }
         }



Mime
View raw message