[poppler] [patch] Remove version check

Brad Hards bradh at frogmouth.net
Tue Dec 6 01:34:28 PST 2005


The poppler version check is:
1. Noisy and annoying, and confusing (#5217, 
https://bugs.freedesktop.org/show_bug.cgi?id=5217)
2. Useless - because it probably won't be visible to the GUI apps we're 
targetting, and it doesn't help you deal with the problem or require any 
action.
3. Incorrect - because we don't really support all of PDF 1.5, and we do 
support things that are from 1.6 (IIRC)

Patch:
Index: poppler/PDFDoc.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/PDFDoc.cc,v
retrieving revision 1.8
diff -u -4 -p -r1.8 PDFDoc.cc
--- poppler/PDFDoc.cc   30 Oct 2005 20:29:05 -0000      1.8
+++ poppler/PDFDoc.cc   6 Dec 2005 09:30:56 -0000
@@ -309,13 +309,8 @@ void PDFDoc::checkHeader() {
     char *theLocale = setlocale(LC_NUMERIC, "C");
     pdfVersion = atof(p);
     setlocale(LC_NUMERIC, theLocale);
   }
-  if (!(hdrBuf[i+5] >= '0' && hdrBuf[i+5] <= '9') ||
-      pdfVersion > supportedPDFVersionNum + 0.0001) {
-    error(-1, "PDF version %s -- xpdf supports version %s"
-         " (continuing anyway)", p, supportedPDFVersionStr);
-  }
 }

 GBool PDFDoc::checkEncryption(GooString *ownerPassword, GooString 
*userPassword) {
   Object encrypt;


OK to commit?

Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20051206/6e85b481/attachment-0001.pgp


More information about the poppler mailing list