Comment 5 for bug 528329

Revision history for this message
Olivier (oc-spam66) wrote :

I can merge on the first page of this file, but not on the second.
The error is:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)

     84 print "Page: " + str(n)
     85 page = base_pdf.getPage(n)
---> 86 page.mergePage(stamp_page)
     87 output.addPage(page)
     88

/usr/lib/pymodules/python2.6/pyPdf/pdf.pyc in mergePage(self, page2)
    995
    996 originalContent = self["/Contents"].getObject()
--> 997 newContentArray.append(PageObject._pushPopGS(originalContent, self.pdf))
    998
    999 page2Content = page2['/Contents'].getObject()

/usr/lib/pymodules/python2.6/pyPdf/pdf.pyc in _pushPopGS(contents, pdf)
    952 # of a content stream. This isolates it from changes such as

    953 # transformation matricies.

--> 954 stream = ContentStream(contents, pdf)
    955 stream.operations.insert(0, [[], "q"])
    956 stream.operations.append([[], "Q"])

/usr/lib/pymodules/python2.6/pyPdf/pdf.pyc in __init__(self, stream, pdf)
   1116 else:
   1117 stream = StringIO(stream.getData())
-> 1118 self.__parseContentStream(stream)
   1119
   1120 def __parseContentStream(self, stream):

/usr/lib/pymodules/python2.6/pyPdf/pdf.pyc in __parseContentStream(self, stream)
   1155 peek = stream.read(1)
   1156 else:
-> 1157 operands.append(readObject(stream, None))
   1158
   1159 def _readInlineImage(self, stream):

/usr/lib/pymodules/python2.6/pyPdf/generic.pyc in readObject(stream, pdf)
     85 return IndirectObject.readFromStream(stream, pdf)
     86 else:
---> 87 return NumberObject.readFromStream(stream)
     88
     89 class PdfObject(object):

/usr/lib/pymodules/python2.6/pyPdf/generic.pyc in readFromStream(stream)
    230 return FloatObject(name)
    231 else:
--> 232 return NumberObject(name)
    233 readFromStream = staticmethod(readFromStream)
    234

ValueError: invalid literal for int() with base 10: ''
------------------------------------------------------------------------------------------------------------