Skip to content

Commit

Permalink
Use a different element structure for each page
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Oct 11, 2022
1 parent b04bfff commit c215697
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions weasyprint/pdf/pdfua.py
Expand Up @@ -30,13 +30,12 @@ def pdfua(pdf, metadata, document, page_streams):
structure_root['K'] = pydyf.Array([structure_document.reference])
pdf.catalog['StructTreeRoot'] = structure_root.reference

structure = {}
document.build_element_structure(structure)

document_children = []
content_mapping['Nums'] = pydyf.Array()
links = []
for page_number, page_stream in enumerate(page_streams):
structure = {}
document.build_element_structure(structure)
parents = [None] * len(page_stream.marked)
for mcid, (key, box) in enumerate(page_stream.marked):
# Build structure elements
Expand Down

0 comments on commit c215697

Please sign in to comment.