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/02/17 18:29:24 UTC

svn commit: r1660451 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java

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);
             }
         }