Commits

George Saunders committed ff9db6d

Fix pdfminer API changes.

  • Participants
  • Parent commits 25a934c

Comments (0)

Files changed (1)

File MoinMoin/converter/pdf_in.py

 from MoinMoin import log
 logging = log.getLogger(__name__)
 
-from pdfminer.pdfparser import PDFDocument, PDFParser
-from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter, process_pdf
+from pdfminer.pdfparser import PDFParser
+from pdfminer.pdfdocument import PDFDocument
+from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
+from pdfminer.pdfpage import PDFPage
 from pdfminer.pdfdevice import PDFDevice
 from pdfminer.converter import TextConverter
 from pdfminer.cmapdb import CMapDB
         rsrcmgr = PDFResourceManager()
         device = UnicodeConverter(rsrcmgr, laparams=LAPARAMS)
         try:
-            process_pdf(rsrcmgr, device, rev)
+            interpreter = PDFPageInterpreter(rsrcmgr, device)
+            for page in PDFPage.get_pages(rev):
+                interpreter.process_page(page)
             return device.read_result()
         finally:
             device.close()