Hi there,
My name is Jackson and I am currently setting up my labeling platform with LabelStudio. Our goal is rate the annotation of a multi-page PDF and each annotation has a list of sub-annotations. The length of the annotation for each page is different (hence we cannot predefine a schema and it would not be the best user experience to display empty annotation). I have looked through list, paragraph and some of your examples but didn’t find any solution. In addition, some of the annotation span multiple pages (a huge bounding box) and I am not sure how to represent that other than maybe relations.
Any help will be greatly appreciated.
makseq
July 10, 2025, 2:06pm
2
Hello Jackson,
You can treat your PDF as a series of images and then:
Convert each PDF page to an image and load them as one task
Use the Multi-Page Document Annotation pattern (<Image valueList>
+ pagination)
Leverage region-level controls to capture a dynamic number of “sub-annotations” per region
Use per-item controls (e.g. perItem="true"
) for page-level ratings
Represent cross-page spans by drawing one box per page and linking them with <RelationLabels>
1. Task data (JSON)
{
"data": {
"pages": [
"https://…/page1.jpg",
"https://…/page2.jpg",
"https://…/page3.jpg"
]
}
}
2. Labeling config
<View>
<!-- A. Page-level rating -->
<Choices name="page_rating" toName="pdf" perItem="true">
<Choice value="✔️ Good"/>
<Choice value="❌ Needs work"/>
</Choices>
<!-- B. Draw annotations on each page -->
<RectangleLabels name="labels" toName="pdf">
<Label value="Section"/>
</RectangleLabels>
<!-- C. Sub-annotations for each region (dynamic count!) -->
<TextArea name="sub_notes"
toName="pdf"
perRegion="true"
placeholder="Add sub-annotation…"/>
<!-- D. Multi-page pagination -->
<Image valueList="$pages" name="pdf"/>
</View>
<Image valueList="$pages">
automatically adds next/prev controls and loops over your pages.
Users draw as many rectangles as needed on each page (no front-loaded empty fields).
Each rectangle spawns its own <TextArea perRegion>
instance for unlimited “sub-annotations.”
Page ratings are handled by perItem="true"
on <Choices>
(or you can use <Rating>
likewise).
3. Spanning annotations across pages
To mark a logical box that covers multiple pages:
Draw one rectangle per relevant page.
Add this tag to let annotators link those rectangles:<RelationLabels name="cross_page" toName="pdf" strokeWidth="2">
<Label value="Continued from previous page"/>
</RelationLabels>
Annotators select two boxes (on different pages) and apply the “Continued…” relation.
Further information:
Thanks so much for getting back to me so quickly Max! That all makes sense and will proceed to implementation.