Analyze this document image and extract ALL content with precise layout structure. ROW GROUPING RULES (CRITICAL): 1. Elements on the SAME HORIZONTAL LINE must be in the SAME row 2. Multi-line text that forms ONE VISUAL BLOCK should be ONE element with \n between lines Example: "COC 92429925\n30 September 2023" is ONE element if vertically stacked together 3. Only create separate rows when there is CLEAR VERTICAL SEPARATION between content 4. Header area (logo + organization name) = usually 1-2 rows 5. Footer area (page number + verification info) = usually 1-2 rows CONTENT EXTRACTION: 1. Extract EVERY piece of text including reference numbers, dates, fine print 2. For TABLES/FORMS (label: value pairs): label in "left", ":" in "center", value in "right" 3. Merge continuous paragraph text into single elements For each element provide: - "content": Exact text (use \n for line breaks within same visual block) - "type": header, title, subtitle, paragraph, list_item, label, value, footer, logo_area, photo_area, signature_area, qr_code - "region": "full_width", "left", "right", or "center" - "style": {"alignment", "bold", "size": "small/normal/large/xlarge"} TABLE/FORM FLAGS: - "table_start": true - when a new table section begins - "has_border_top": true - row has visible horizontal line above (part of table) - "has_grid": true - table has visible grid lines - "has_background": true - row has background color PLACEHOLDERS (keep as separate elements): - "[Logo Affixed]" for logos/emblems - "[Photo Affixed]" for photographs - "[Signature Affixed]" for signatures - "[QR Code Affixed]" for QR codes Return ONLY valid JSON: { "document_type": "certificate", "layout_rows": [ { "row": 1, "elements": [ {"content": "[Logo Affixed]", "type": "logo_area", "region": "left", "style": {}}, {"content": "SINGAPORE POLICE FORCE", "type": "header", "region": "center", "style": {"bold": true, "size": "large"}} ] }, { "row": 2, "elements": [ {"content": "CERTIFICATE OF CLEARANCE", "type": "title", "region": "center", "style": {"bold": true, "size": "xlarge"}}, {"content": "COC 92429925\n30 September 2023", "type": "value", "region": "right", "style": {"bold": true}} ] }, { "row": 3, "elements": [ {"content": "This is to certify that MR TAN PING CHEW WILSON...", "type": "paragraph", "region": "full_width", "style": {}} ] }, { "row": 4, "elements": [ {"content": "[Photo Affixed]", "type": "photo_area", "region": "left", "style": {}}, {"content": "Criminal Investigation Department\nSingapore Police Force", "type": "paragraph", "region": "right", "style": {}} ] }, { "row": 5, "elements": [ {"content": "Page 1 of 1", "type": "footer", "region": "left", "style": {"size": "small"}}, {"content": "[QR Code Affixed]", "type": "qr_code", "region": "right", "style": {}} ] } ] } REMEMBER: - Same horizontal line = SAME row - Vertically stacked text in one visual block = ONE element with \n - Only separate rows for CLEAR vertical gaps