Merge pull request #338 from kgengler/master

Fix issue #337 - Rotate PDF fails if /Rotate is set to an IndirectObject
This commit is contained in:
Matthew Stamy 2017-12-27 16:19:24 -06:00 committed by GitHub
commit a4279cff96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2226,7 +2226,8 @@ class PageObject(DictionaryObject):
return self
def _rotate(self, angle):
currentAngle = self.get("/Rotate", 0)
rotateObj = self.get("/Rotate", 0)
currentAngle = rotateObj if isinstance(rotateObj, int) else rotateObj.getObject()
self[NameObject("/Rotate")] = NumberObject(currentAngle + angle)
def _mergeResources(res1, res2, resource):