$OpenBSD: patch-texk_web2c_luatexdir_image_pdftoepdf_cc,v 1.1 2009/12/12 17:48:34 edd Exp $
--- texk/web2c/luatexdir/image/pdftoepdf.cc.orig	Thu Jun 25 15:05:10 2009
+++ texk/web2c/luatexdir/image/pdftoepdf.cc	Tue Oct 13 17:43:02 2009
@@ -666,7 +666,7 @@ static void writeEncodings()
     }
     for (r = encodingList; r != NULL; r = n) {
         n = r->next;
-        delete r->font;
+        r->font->decRefCnt();
         delete r;
     }
 }
@@ -720,7 +720,8 @@ read_pdf_info(image_dict * idict, integer minor_pdf_ve
     // this works only for PDF 1.x -- but since any versions of PDF newer
     // than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will
     // then have to changed drastically anyway.
-    pdf_version_found = pdf_doc->doc->getPDFVersion();
+    pdf_version_found = pdf_doc->doc->getPDFMajorVersion() +
+			0.1 * pdf_doc->doc->getPDFMinorVersion();
     pdf_version_wanted = 1 + (minor_pdf_version_wanted * 0.1);
     if (pdf_version_found > pdf_version_wanted + 0.01) {
         char msg[] =
