| 421 | |
| 422 | def receive_layout(self, ltpage): |
| 423 | def show_group(item): |
| 424 | if isinstance(item, LTTextBox): |
| 425 | self.outfp.write('<textbox id="%d" bbox="%s" />\n' % |
| 426 | (item.index, bbox2str(item.bbox))) |
| 427 | elif isinstance(item, LTTextGroup): |
| 428 | self.outfp.write('<textgroup bbox="%s">\n' % bbox2str(item.bbox)) |
| 429 | for child in item: |
| 430 | show_group(child) |
| 431 | self.outfp.write('</textgroup>\n') |
| 432 | return |
| 433 | def render(item): |
| 434 | if isinstance(item, LTPage): |
| 435 | self.outfp.write('<page id="%s" bbox="%s" rotate="%d">\n' % |