Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pyPdf/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def writeToStream(self, stream, encryption_key):

class NumberObject(int, PdfObject):
def __init__(self, value):
int.__init__(value)
super(NumberObject, self).__init__(value)

def writeToStream(self, stream, encryption_key):
stream.write(repr(self))
Expand Down Expand Up @@ -417,7 +417,7 @@ class NameObject(str, PdfObject):
delimiterCharacters = "(", ")", "<", ">", "[", "]", "{", "}", "/", "%"

def __init__(self, data):
str.__init__(data)
super(NameObject, self).__init__(data)

def writeToStream(self, stream, encryption_key):
stream.write(self)
Expand Down Expand Up @@ -663,7 +663,7 @@ def __init__(self, arr):
# must have four points
assert len(arr) == 4
# automatically convert arr[x] into NumberObject(arr[x]) if necessary
ArrayObject.__init__(self, [self.ensureIsNumber(x) for x in arr])
super(RectangleObject, self).__init__(self, [self.ensureIsNumber(x) for x in arr])

def ensureIsNumber(self, value):
if not isinstance(value, (NumberObject, FloatObject)):
Expand All @@ -687,7 +687,7 @@ def getUpperRight_y(self):

def getUpperLeft_x(self):
return self.getLowerLeft_x()

def getUpperLeft_y(self):
return self.getUpperRight_y()

Expand Down