{
 "last_node_id": 13,
 "last_link_id": 11,
 "nodes": [
  {
   "id": 1,
   "type": "MarkdownNote",
   "pos": [
    0,
    -460.0
   ],
   "size": [
    640,
    290
   ],
   "flags": {},
   "order": 1,
   "mode": 0,
   "inputs": [],
   "outputs": [],
   "properties": {},
   "widgets_values": [
    "**Needs in ComfyUI's `input` folder:** `page0.png` .. `page2.png`\n\nThe multi-page variant of the scan-document example: three photos of text pages (page0.png .. page2.png, on a table, turned and in perspective) are batched. Scan document finds each page, rectifies it, turns it upright and reads it: the pages come out as one image batch, the text as one string (pages separated by a blank line) and the JSON has one entry per page. Below: plain OCR on the same batch (no page finding) for text the page finder does not need to cut out; the quads show where each line was read. Switch on dewarp for curved pages."
   ]
  },
  {
   "id": 2,
   "type": "LoadImage",
   "pos": [
    0.0,
    0.0
   ],
   "size": [
    300,
    340
   ],
   "flags": {},
   "order": 2,
   "mode": 0,
   "inputs": [],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      1
     ],
     "slot_index": 0
    },
    {
     "name": "MASK",
     "type": "MASK",
     "links": [],
     "slot_index": 1
    }
   ],
   "properties": {},
   "widgets_values": [
    "page0.png",
    "image"
   ]
  },
  {
   "id": 3,
   "type": "LoadImage",
   "pos": [
    0.0,
    380.0
   ],
   "size": [
    300,
    340
   ],
   "flags": {},
   "order": 3,
   "mode": 0,
   "inputs": [],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      2
     ],
     "slot_index": 0
    },
    {
     "name": "MASK",
     "type": "MASK",
     "links": [],
     "slot_index": 1
    }
   ],
   "properties": {},
   "widgets_values": [
    "page1.png",
    "image"
   ]
  },
  {
   "id": 4,
   "type": "LoadImage",
   "pos": [
    0.0,
    760.0
   ],
   "size": [
    300,
    340
   ],
   "flags": {},
   "order": 4,
   "mode": 0,
   "inputs": [],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      4
     ],
     "slot_index": 0
    },
    {
     "name": "MASK",
     "type": "MASK",
     "links": [],
     "slot_index": 1
    }
   ],
   "properties": {},
   "widgets_values": [
    "page2.png",
    "image"
   ]
  },
  {
   "id": 5,
   "type": "ImageBatch",
   "pos": [
    380.0,
    0.0
   ],
   "size": [
    200,
    50
   ],
   "flags": {},
   "order": 5,
   "mode": 0,
   "inputs": [
    {
     "name": "image1",
     "type": "IMAGE",
     "link": 1
    },
    {
     "name": "image2",
     "type": "IMAGE",
     "link": 2
    }
   ],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      3
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 6,
   "type": "ImageBatch",
   "pos": [
    660.0,
    120.0
   ],
   "size": [
    200,
    50
   ],
   "flags": {},
   "order": 6,
   "mode": 0,
   "inputs": [
    {
     "name": "image1",
     "type": "IMAGE",
     "link": 3
    },
    {
     "name": "image2",
     "type": "IMAGE",
     "link": 4
    }
   ],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      5,
      9
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 7,
   "type": "FastforksScanDocument",
   "pos": [
    1100.0,
    0.0
   ],
   "size": [
    330,
    380
   ],
   "flags": {},
   "order": 7,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 5
    }
   ],
   "outputs": [
    {
     "name": "page",
     "type": "IMAGE",
     "links": [
      6
     ],
     "slot_index": 0
    },
    {
     "name": "text",
     "type": "STRING",
     "links": [
      7
     ],
     "slot_index": 1
    },
    {
     "name": "scan",
     "type": "STRING",
     "links": [
      8
     ],
     "slot_index": 2
    }
   ],
   "properties": {},
   "widgets_values": [
    "ppocrv5-mobile",
    "auto",
    "auto",
    true,
    false,
    true,
    "none",
    false
   ]
  },
  {
   "id": 8,
   "type": "PreviewImage",
   "pos": [
    1510.0,
    0.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 8,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 6
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 9,
   "type": "PreviewAny",
   "pos": [
    1510.0,
    340.0
   ],
   "size": [
    400,
    400
   ],
   "flags": {},
   "order": 9,
   "mode": 0,
   "inputs": [
    {
     "name": "source",
     "type": "*",
     "link": 7
    }
   ],
   "outputs": [
    {
     "name": "STRING",
     "type": "STRING",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "all pages: text",
   "widgets_values": []
  },
  {
   "id": 10,
   "type": "PreviewAny",
   "pos": [
    1510.0,
    780.0
   ],
   "size": [
    400,
    300
   ],
   "flags": {},
   "order": 10,
   "mode": 0,
   "inputs": [
    {
     "name": "source",
     "type": "*",
     "link": 8
    }
   ],
   "outputs": [
    {
     "name": "STRING",
     "type": "STRING",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "scan (per page)",
   "widgets_values": []
  },
  {
   "id": 11,
   "type": "FastforksOCR",
   "pos": [
    1100.0,
    800.0
   ],
   "size": [
    330,
    230
   ],
   "flags": {},
   "order": 11,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 9
    }
   ],
   "outputs": [
    {
     "name": "text",
     "type": "STRING",
     "links": [
      11
     ],
     "slot_index": 0
    },
    {
     "name": "lines",
     "type": "STRING",
     "links": [],
     "slot_index": 1
    },
    {
     "name": "preview",
     "type": "IMAGE",
     "links": [
      10
     ],
     "slot_index": 2
    }
   ],
   "properties": {},
   "widgets_values": [
    "ppocrv5-mobile",
    "auto",
    "auto",
    2
   ]
  },
  {
   "id": 12,
   "type": "PreviewImage",
   "pos": [
    1510.0,
    1120.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 12,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 10
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 13,
   "type": "PreviewAny",
   "pos": [
    1510.0,
    1460.0
   ],
   "size": [
    400,
    300
   ],
   "flags": {},
   "order": 13,
   "mode": 0,
   "inputs": [
    {
     "name": "source",
     "type": "*",
     "link": 11
    }
   ],
   "outputs": [
    {
     "name": "STRING",
     "type": "STRING",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "text (no page finding)",
   "widgets_values": []
  }
 ],
 "links": [
  [
   1,
   2,
   0,
   5,
   0,
   "IMAGE"
  ],
  [
   2,
   3,
   0,
   5,
   1,
   "IMAGE"
  ],
  [
   3,
   5,
   0,
   6,
   0,
   "IMAGE"
  ],
  [
   4,
   4,
   0,
   6,
   1,
   "IMAGE"
  ],
  [
   5,
   6,
   0,
   7,
   0,
   "IMAGE"
  ],
  [
   6,
   7,
   0,
   8,
   0,
   "IMAGE"
  ],
  [
   7,
   7,
   1,
   9,
   0,
   "*"
  ],
  [
   8,
   7,
   2,
   10,
   0,
   "*"
  ],
  [
   9,
   6,
   0,
   11,
   0,
   "IMAGE"
  ],
  [
   10,
   11,
   2,
   12,
   0,
   "IMAGE"
  ],
  [
   11,
   11,
   0,
   13,
   0,
   "*"
  ]
 ],
 "groups": [
  {
   "id": 1,
   "title": "Inputs",
   "bounding": [
    -30.0,
    -90.0,
    920.0,
    1220.0
   ],
   "color": "#88A",
   "font_size": 24,
   "flags": {}
  },
  {
   "id": 2,
   "title": "fastforks",
   "bounding": [
    1070.0,
    -90.0,
    870.0,
    1880.0
   ],
   "color": "#3f789e",
   "font_size": 24,
   "flags": {}
  }
 ],
 "config": {},
 "extra": {},
 "version": 0.4
}