# Multi-page labeling importing pre-annotated data

**URL:** <https://community.labelstud.io/t/multi-page-labeling-importing-pre-annotated-data/376>\
**Category:** Label Studio Support\
**Created:** [October 9, 2024, 10:42am UTC](https://community.labelstud.io/t/multi-page-labeling-importing-pre-annotated-data/376 "2024-10-09T10:42:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barry](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@Barry](https://community.labelstud.io/u/Barry)\
**Post date:** [October 9, 2024, 10:42am UTC](https://community.labelstud.io/t/multi-page-labeling-importing-pre-annotated-data/376/1 "2024-10-09T10:42:18Z")

</div>

For a project I am working on I want to use Label Studio for labeling multi-page pdf documents. To achieve this, I am converting each page of the pdf to an image. Pre-annotating is done locally and I want to import the Task in JSON format into Label Studio to adjust the pre-annotated pages. My Labeling Interface looks like

```auto
<View>
  <Repeater on="$document" indexFlag="{{idx}}">
      <Header value="Page: {{idx}}"></Header>
      <Image name="page_{{idx}}" value="$document[{{idx}}].page" inline="true" zoom="true" zoomControl="true" rotateControl="false"/>
      <RectangleLabels name="labels_{{idx}}" toName="page_{{idx}}">        
      	<Label value="Table" background="#fffb00"/>
      </RectangleLabels>
  </Repeater>
</View>

```

and an example of a Task JSON I have is:

```auto
[
    {
        "document": [
            {
                "page": "data/local-files?d=images/test_page.pdf-0.jpg"
            }
        ],
        "predictions": [
            {
                "result": [
                    {
                        "original_width": 596,
                        "original_height": 842,
                        "image_rotation": 0,
                        "value": {
                            "x": 10.714892452731128,
                            "y": 25.596285206121955,
                            "width": 82.16993093476225,
                            "height": 23.269432230969787,
                            "rotation": 0,
                            "rectanglelabels": [
                                "Table"
                            ]
                        },
                        "id": "0-0",
                        "from_name": "labels_0",
                        "to_name": "page_0",
                        "type": "rectanglelabels"
                    },
                    {
                        "original_width": 596,
                        "original_height": 842,
                        "image_rotation": 0,
                        "value": {
                            "x": 10.714892452731128,
                            "y": 62.237614067603175,
                            "width": 82.16413730131939,
                            "height": 10.457083731535779,
                            "rotation": 0,
                            "rectanglelabels": [
                                "Table"
                            ]
                        },
                        "id": "0-1",
                        "from_name": "labels_0",
                        "to_name": "page_0",
                        "type": "rectanglelabels"
                    }
                ]
            }
        ]
    }
]

```

I am using local storage as one can see in the Task JSON. Before trying the multi-page approach, I already tried to have one separate labeling task per page. This worked fine, however, it would be more convenient to have one task per file instead of per page. The problem with my current multi-page approach is that it does not show the predictions (or pre-annotations) in Label Studio. My question is if anyone has any idea on how to solve this? Thanks!

---

<div class="post-metadata">

**Author:** ![Barry](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@Barry](https://community.labelstud.io/u/Barry)\
**Post date:** [October 10, 2024, 8:10am UTC](https://community.labelstud.io/t/multi-page-labeling-importing-pre-annotated-data/376/2 "2024-10-10T08:10:22Z")

</div>

Fixed it.  
Label Studio always expects a _data_ field. As I did not have it, it was adding one on its own when importing a task which caused the _predictions_ field to be inside of the _data_ field and resulted in Label Studio creating an empty _predictions_ field outside of the _data_ field ignoring the predictions given in the task.
