You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assuming I'm working with Layout elements from the root node Document: layouts = doc.layouts
Example 1) I slice some layouts and get their text: filtered_layouts = [l.get_text() for l in layouts if l.page == 2 and l.layout_type = "LAYOUT_TEXT"]
Example 2) getting the text of page two direcly (assuming the page layouts are all "LAYOUT_TEXT"):
page_two = doc.pages[1]
page_two.to_text()
My goal is to be able to tweak at a Layout-level grain in order to implement my logic and than be able to recostruct the original formatting of the slice of layouts. How can I do this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Assuming I'm working with Layout elements from the root node Document:
layouts = doc.layoutsExample 1) I slice some layouts and get their text:
filtered_layouts = [l.get_text() for l in layouts if l.page == 2 and l.layout_type = "LAYOUT_TEXT"]Example 2) getting the text of page two direcly (assuming the page layouts are all "LAYOUT_TEXT"):
My goal is to be able to tweak at a Layout-level grain in order to implement my logic and than be able to recostruct the original formatting of the slice of layouts. How can I do this?
Beta Was this translation helpful? Give feedback.
All reactions