blob: 4b3218484ce60d2d26889e4831a2bfc418db1e4e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#! /usr/bin/env python
"""Dumb script to edit a particular line in the PostScript.
This makes it possible to print on A4 paper.
"""
f = open("ref.ps", "r")
lines = f.readlines()
f.close()
didit = 0
for i in range(100):
if lines[i] == '/FMAllowPaperSizeMismatch false def\n':
lines[i] = '/FMAllowPaperSizeMismatch true def\n'
didit = 1
break
if not didit:
print "ref.ps not changed"
else:
print "rewriting edited ref.ps"
f = open("ref.ps", "w")
f.writelines(lines)
f.close()
|