8000 Merge pull request #2033 from leejjoon/fix-pstoeps · matplotlib/matplotlib@99d4e40 · GitHub
[go: up one dir, main page]

Skip to content

Commit 99d4e40

Browse files
committed
Merge pull request #2033 from leejjoon/fix-pstoeps
fix pstoeps function in backend_ps.py
2 parents 3586394 + 3e03751 commit 99d4e40

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/matplotlib/backends/backend_ps.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1697,15 +1697,12 @@ def pstoeps(tmpfile, bbox=None, rotated=False):
16971697
# eps file is not modified.
16981698
line = tmph.readline()
16991699
while line:
1700-
if line.startswith(b'%%Trailer'):
1701-
write(b'%%Trailer\n')
1700+
if line.startswith(b'%%EOF'):
17021701
write(b'cleartomark\n')
17031702
write(b'countdictstack\n')
17041703
write(b'exch sub { end } repeat\n')
17051704
write(b'restore\n')
1706-
if rcParams['ps.usedistiller'] == 'xpdf':
1707-
# remove extraneous "end" operator:
1708-
line = tmph.readline()
1705+
write(b'%%EOF\n')
17091706
elif line.startswith(b'%%PageBoundingBox'):
17101707
pass
17111708
else:

0 commit comments

Comments
 (0)
0