Skip to main content
← Back to Gallery

📄 Images from Document

Extract embedded photos from scanned documents. For .docx files, extracts embedded images directly via python-docx. For .doc/.docm files, first converts the document to PDF via LibreOffice in headless mode. Converts each PDF page to a raster image, detects photo regions via contour analysis, OCRs the caption area below each photo, and saves cropped images as JPEGs with EXIF metadata containing the caption. Typical input: scanned property documentation with inline photographs (e.g. "Documentazione Fotografica" from Italian real-estate dossiers).

Workflow Details

Workflow ID: images_from_document_v1
Version: 1.0.0
Total Steps: 1

Workflow Steps

1
Extract Images
python

Input Configuration

Select an instance to apply configuration overrides.
Supported formats: PDF, DOC, DOCX, TXT, PNG, JPG
Path to the source document (.pdf, .doc, .docx, .docm)
Directory for extracted photos (default: alongside source file)

Execution Preview

This workflow will execute the following steps in order:

1 Extract Images
Processor: python
Total Steps: 1

Example Output

{
  "structured_data": {
    "sale_id": "RG 123/2024",
    "tribunal": "Tribunale di Roma",
    "lot_number": "1",
    "assets": [...],
    "valuation": {
      "market_value": 250000.00,
      "auction_base_price": 187500.00
    }
  },
  "metadata": {
    "processing_time": 24.7,
    "llm_provider": "mistralai/Mistral-7B-Instruct-v0.3"
  }
}