pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1659637 - /pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java
Date Fri, 13 Feb 2015 18:21:01 GMT
Author: lehmi
Date: Fri Feb 13 18:21:01 2015
New Revision: 1659637

URL: http://svn.apache.org/r1659637
Log:
PDFBOX-2099: use new API to get version information

Modified:
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java?rev=1659637&r1=1659636&r2=1659637&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java
Fri Feb 13 18:21:01 2015
@@ -71,8 +71,8 @@ public class TrailerValidationProcess ex
             // and it must have the same ID than the last trailer.
             // According to the PDF version, trailers are available by the trailer key word
(pdf <= 1.4)
             // or in the dictionary of the XRef stream ( PDF >= 1.5)
-            String pdfVersion = pdfDoc.getDocument().getHeaderString();
-            if (pdfVersion != null && pdfVersion.matches("%PDF-1\\.[1-4]"))
+            float pdfVersion = pdfDoc.getVersion();
+            if (pdfVersion <= 1.4f)
             {
                 checkTrailersForLinearizedPDF14(ctx);
             }



Mime
View raw message