pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1642965 - in /pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight: ./ annotation/ annotation/pdfa/ content/
Date Mon, 15 Dec 2014 17:11:24 GMT
Author: tilman
Date: Tue Dec  2 17:51:21 2014
New Revision: 1642965

URL: http://svn.apache.org/r1642965
Log:
PDFBOX-1675: fix typos

Added:
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/InkAnnotationValidator.java
      - copied, changed from r1642481, pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/InkAnnotationValdiator.java
Removed:
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/InkAnnotationValdiator.java
Modified:
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConstants.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/AnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/pdfa/PDFAbAnnotationFactory.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightContentStream.java

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConstants.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConstants.java?rev=1642965&r1=1642964&r2=1642965&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConstants.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConstants.java
Tue Dec  2 17:51:21 2014
@@ -284,8 +284,9 @@ public interface PreflightConstants
     String ICC_Characterization_Data_Registry_ERIMM = "ERIMM RGB";
     String ICC_Characterization_Data_Registry_eciRGB = "eciRGB";
     String ICC_Characterization_Data_Registry_opRGB = "opRGB";
+    
     /**
-     * Error code uses by the Valdiator when there are an error without error code.
+     * Error code uses by the Validator when there is an error without error code.
      */
     String ERROR_UNKOWN_ERROR = "-1";
 

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/AnnotationValidator.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/AnnotationValidator.java?rev=1642965&r1=1642964&r2=1642965&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/AnnotationValidator.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/AnnotationValidator.java
Tue Dec  2 17:51:21 2014
@@ -23,6 +23,7 @@ package org.apache.pdfbox.preflight.anno
 
 import static org.apache.pdfbox.preflight.PreflightConfiguration.ACTIONS_PROCESS;
 import static org.apache.pdfbox.preflight.PreflightConfiguration.GRAPHIC_PROCESS;
+import static org.apache.pdfbox.preflight.PreflightConfiguration.RESOURCES_PROCESS;
 import static org.apache.pdfbox.preflight.PreflightConstants.ANNOT_DICTIONARY_VALUE_SUBTYPE_POPUP;
 import static org.apache.pdfbox.preflight.PreflightConstants.ERROR_ANNOT_FORBIDDEN_COLOR;
 import static org.apache.pdfbox.preflight.PreflightConstants.ERROR_ANNOT_FORBIDDEN_FLAG;
@@ -36,6 +37,7 @@ import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSDictionary;
 import org.apache.pdfbox.cos.COSDocument;
 import org.apache.pdfbox.cos.COSName;
+import org.apache.pdfbox.pdmodel.PDResources;
 import org.apache.pdfbox.pdmodel.common.PDStream;
 import org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject;
 import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation;
@@ -201,6 +203,17 @@ public abstract class AnnotationValidato
                 ContextHelper.validateElement(ctx, new PDFormXObject(
                         new PDStream(COSUtils.getAsStream(apn, cosDocument)), "N"),
                         GRAPHIC_PROCESS);
+//                // resources
+//                if (COSUtils.isDictionary(apn, cosDocument))
+//                {
+//                    COSDictionary apnDict = COSUtils.getAsDictionary(apn, cosDocument);
+//                    COSDictionary resources = (COSDictionary) apnDict.getDictionaryObject(COSName.RESOURCES);
+//                    //TODO type
+//                    if (resources != null)
+//                    {
+//                        ContextHelper.validateElement(ctx, new PDResources(resources),
RESOURCES_PROCESS);
+//                    }
+//                }
             }
         } // else ok, nothing to check,this field is optional
         return true;

Copied: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/InkAnnotationValidator.java
(from r1642481, pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/InkAnnotationValdiator.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/InkAnnotationValidator.java?p2=pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/InkAnnotationValidator.java&p1=pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/InkAnnotationValdiator.java&r1=1642481&r2=1642965&rev=1642965&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/InkAnnotationValdiator.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/InkAnnotationValidator.java
Tue Dec  2 17:51:21 2014
@@ -31,14 +31,14 @@ import org.apache.pdfbox.preflight.Prefl
 /**
  * Validation class for the InkAnnotation
  */
-public class InkAnnotationValdiator extends AnnotationValidator
+public class InkAnnotationValidator extends AnnotationValidator
 {
     /**
      * PDFBox which wraps the annotation dictionary
      */
     protected PDAnnotationUnknown pdUnk = null;
 
-    public InkAnnotationValdiator(PreflightContext ctx, COSDictionary annotDictionary)
+    public InkAnnotationValidator(PreflightContext ctx, COSDictionary annotDictionary)
     {
         super(ctx, annotDictionary);
         this.pdUnk = new PDAnnotationUnknown(annotDictionary);

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/pdfa/PDFAbAnnotationFactory.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/pdfa/PDFAbAnnotationFactory.java?rev=1642965&r1=1642964&r2=1642965&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/pdfa/PDFAbAnnotationFactory.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/pdfa/PDFAbAnnotationFactory.java
Tue Dec  2 17:51:21 2014
@@ -40,7 +40,7 @@ import static org.apache.pdfbox.prefligh
 
 import org.apache.pdfbox.preflight.annotation.AnnotationValidatorFactory;
 import org.apache.pdfbox.preflight.annotation.FreeTextAnnotationValidator;
-import org.apache.pdfbox.preflight.annotation.InkAnnotationValdiator;
+import org.apache.pdfbox.preflight.annotation.InkAnnotationValidator;
 import org.apache.pdfbox.preflight.annotation.LineAnnotationValidator;
 import org.apache.pdfbox.preflight.annotation.LinkAnnotationValidator;
 import org.apache.pdfbox.preflight.annotation.MarkupAnnotationValidator;
@@ -58,6 +58,7 @@ import org.apache.pdfbox.preflight.annot
 public class PDFAbAnnotationFactory extends AnnotationValidatorFactory
 {
 
+    @Override
     protected void initializeClasses()
     {
         this.validatorClasses.put(ANNOT_DICTIONARY_VALUE_SUBTYPE_TEXT, TextAnnotationValidator.class);
@@ -74,7 +75,7 @@ public class PDFAbAnnotationFactory exte
         this.validatorClasses.put(ANNOT_DICTIONARY_VALUE_SUBTYPE_SQUILGGLY, MarkupAnnotationValidator.class);
 
         this.validatorClasses.put(ANNOT_DICTIONARY_VALUE_SUBTYPE_STAMP, RubberStampAnnotationValidator.class);
-        this.validatorClasses.put(ANNOT_DICTIONARY_VALUE_SUBTYPE_INK, InkAnnotationValdiator.class);
+        this.validatorClasses.put(ANNOT_DICTIONARY_VALUE_SUBTYPE_INK, InkAnnotationValidator.class);
         this.validatorClasses.put(ANNOT_DICTIONARY_VALUE_SUBTYPE_POPUP, PopupAnnotationValidator.class);
         this.validatorClasses.put(ANNOT_DICTIONARY_VALUE_SUBTYPE_WIDGET, WidgetAnnotationValidator.class);
         this.validatorClasses.put(ANNOT_DICTIONARY_VALUE_SUBTYPE_PRINTERMARK, PrintMarkAnnotationValidator.class);

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightContentStream.java?rev=1642965&r1=1642964&r2=1642965&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightContentStream.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightContentStream.java
Tue Dec  2 17:51:21 2014
@@ -315,7 +315,7 @@ public class PreflightContentStream exte
         else if (fontContainer == null)
         {
             // Font Must be embedded if the RenderingMode isn't 3
-            registerError(font.getName() + " is unknown wasn't found by the FontHelperValdiator",
+            registerError(font.getName() + " is unknown wasn't found by the FontHelperValidator",
                     ERROR_FONTS_UNKNOWN_FONT_REF);
             return;
         }



Mime
View raw message