Iterate through the pages of the file. Yields ------ Page Details of all the text and box objects on the page. The Page tuple contains lists of Text and Box tuples and the page dimensions, and the Text and Box tuples contain
(self)
| 260 | self.close() |
| 261 | |
| 262 | def __iter__(self): |
| 263 | """ |
| 264 | Iterate through the pages of the file. |
| 265 | |
| 266 | Yields |
| 267 | ------ |
| 268 | Page |
| 269 | Details of all the text and box objects on the page. |
| 270 | The Page tuple contains lists of Text and Box tuples and |
| 271 | the page dimensions, and the Text and Box tuples contain |
| 272 | coordinates transformed into a standard Cartesian |
| 273 | coordinate system at the dpi value given when initializing. |
| 274 | The coordinates are floating point numbers, but otherwise |
| 275 | precision is not lost and coordinate values are not clipped to |
| 276 | integers. |
| 277 | """ |
| 278 | while self._read(): |
| 279 | yield self._output() |
| 280 | |
| 281 | def close(self): |
| 282 | """Close the underlying file if it is open.""" |