199 | | # Now read the numeric argument |
200 | | size = 0 |
201 | | while 1 : |
202 | | char = minfile[pos] ; pos += 1 |
203 | | if not char.isdigit() : |
204 | | break |
205 | | size = (size * 10) + int(char) |
206 | | if char in tagend : |
207 | | if (tag == "&l") and (char == "X") : # copies for current page |
208 | | copies[pagecount] = size |
209 | | elif (tag == "&l") and (char == "H") and (size == 0) : |
210 | | ejects += 1 # Eject |
211 | | elif (tag == "&a") and (size == 2) : |
212 | | backsides += 1 # Back side in duplex mode |
213 | | else : |
214 | | # we just ignore the block. |
215 | | if tag == "&n" : |
216 | | # we have to take care of the operation id byte |
217 | | # which is before the string itself |
218 | | size += 1 |
219 | | pos += size |
| 200 | try : |
| 201 | tagend = tagsends[tag] |
| 202 | except KeyError : |
| 203 | continue # Unsupported PCL tag |
| 204 | # Now read the numeric argument |
| 205 | size = 0 |
| 206 | while 1 : |
| 207 | char = minfile[pos] ; pos += 1 |
| 208 | if not char.isdigit() : |
| 209 | break |
| 210 | size = (size * 10) + int(char) |
| 211 | if char in tagend : |
| 212 | if (tag == "&l") and (char == "X") : # copies for current page |
| 213 | copies[pagecount] = size |
| 214 | elif (tag == "&l") and (char == "H") and (size == 0) : |
| 215 | ejects += 1 # Eject |
| 216 | elif (tag == "&a") and (size == 2) : |
| 217 | backsides += 1 # Back side in duplex mode |
| 218 | else : |
| 219 | # we just ignore the block. |
| 220 | if tag == "&n" : |
| 221 | # we have to take care of the operation id byte |
| 222 | # which is before the string itself |
| 223 | size += 1 |
| 224 | pos += size |