Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d013280

Browse files
committed
Fix PDFs for use with ReportLab's pedantic parser
svn path=/branches/v0_98_5_maint/; revision=7211
1 parent e1ee001 commit d013280

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/backends/backend_pdf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,10 @@ def writeXref(self):
11771177
'No offset for object %d (%s)' % (i, name)
11781178
borken = True
11791179
else:
1180-
self.write("%010d %05d n \n" % (offset, generation))
1180+
if name == 'the zero object':
1181+
self.write("%010d %05d f \n" % (offset, generation))
1182+
else:
1183+
self.write("%010d %05d n \n" % (offset, generation))
11811184
i += 1
11821185
if borken:
11831186
raise AssertionError, 'Indirect object does not exist'

0 commit comments

Comments
 (0)