### Extract Text and Layout from PDF Source: https://sotaocr.com This example demonstrates the output format for extracted text and layout from a complex multi-column PDF, presented in Markdown with preserved structure. ```markdown # Annual Report 2024 Revenue grew **23%** year-over-year... ``` -------------------------------- ### Extract Formulas and Images from PDF Source: https://sotaocr.com This example illustrates how mathematical notation is extracted as LaTeX and embedded images are processed into separate files. ```latex $$E = mc^2$$ ``` ```latex $$\int_0^\infty e^{-x^2} dx$$ ``` -------------------------------- ### Extract Data from Document Source: https://sotaocr.com This endpoint allows you to upload a PDF document and extract its content, including text, tables, formulas, and bounding boxes, into structured data. ```APIDOC ## POST /v1/extract ### Description Extracts structured data from a PDF document. ### Method POST ### Endpoint https://sotaocr.com/v1/extract ### Parameters #### Request Headers - **Authorization** (string) - Required - Bearer token for authentication. #### Form Data - **file** (file) - Required - The PDF document to process. ### Request Example ```bash curl -X POST https://sotaocr.com/v1/extract \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@document.pdf" ``` ### Response #### Success Response (200) - **text** (string) - Extracted text content in Markdown format. - **tables** (array) - Extracted tables in Markdown table format. - **formulas** (array) - Extracted mathematical formulas in LaTeX format. - **bounding_boxes** (array) - Detected elements with their bounding box coordinates and confidence scores. ``` -------------------------------- ### Extract Bounding Boxes for Elements Source: https://sotaocr.com This snippet shows the JSON output for bounding box coordinates of detected elements on a page, including type, coordinates, and confidence score. ```json {"type": "table", "bbox": [42, 180, 520, 340], "confidence": 0.97} ``` -------------------------------- ### Extract Structured Tables from PDF Source: https://sotaocr.com This snippet shows how intricate tables with merged cells from a PDF are converted into perfectly structured Markdown tables. ```markdown | Metric | Q1 | Q2 | |----------|-------|-------| | Revenue | $12M | $15M | ``` -------------------------------- ### Extract Data from PDF using cURL Source: https://sotaocr.com This snippet shows how to send a POST request to the SotaOCR API to extract data from a PDF file. Ensure you replace 'YOUR_API_KEY' with your actual API key. ```bash curl -X POST https://sotaocr.com/v1/extract \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@document.pdf" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.