pyPdf icon indicating copy to clipboard operation
pyPdf copied to clipboard

py3: global name 'RectangleObject' is not defined

Open DavidWiesner opened this issue 15 years ago • 0 comments

I try the Example from README in python 3.1. there are two issues:

  1. command file() should be replaced with command open()
  2. pdf.py needed the RectangleObject but is not imported.

here is an diff to solve the second issue

--- ../../old_pdf.py/pdf.py 2009-10-15 10:56:54.000000000 +0200 +++ pdf.py 2010-05-12 18:19:45.000000000 +0200 @@ -47,7 +47,7 @@ from .generic import (readObject, DictionaryObject, DecodedStreamObject, NameObject, NumberObject, ArrayObject, IndirectObject, ByteStringObject, StreamObject, NullObject, TextStringObject,

  •    createStringObject, BooleanObject)
    
  •    createStringObject, BooleanObject, RectangleObject)
    
    from .utils import (readNonWhitespace, readUntilWhitespace, ConvertFunctionsToVirtualList, PdfReadError, RC4_encrypt) thanks so far, david wiesner

DavidWiesner avatar May 12 '10 16:05 DavidWiesner