MCPcopy Create free account
hub / github.com/clips/pattern / receive_layout

Method receive_layout

pattern/web/pdf/converter.py:180–193  ·  view source on GitHub ↗
(self, ltpage)

Source from the content-addressed store, hash-verified

178 return
179
180 def receive_layout(self, ltpage):
181 def render(item):
182 if isinstance(item, LTContainer):
183 for child in item:
184 render(child)
185 elif isinstance(item, LTText):
186 self.write_text(item.get_text())
187 if isinstance(item, LTTextBox):
188 self.write_text('\n')
189 if self.showpageno:
190 self.write_text('Page %s\n' % ltpage.pageid)
191 render(ltpage)
192 self.write_text('\f')
193 return
194
195 # Some dummy functions to save memory/CPU when all that is wanted is text.
196 # This stops all the image and drawing ouput from being recorded and taking

Callers

nothing calls this directly

Calls 2

write_textMethod · 0.95
renderFunction · 0.50

Tested by

no test coverage detected