<?php
$file = 'c:\Users\Pc\Desktop\2026 FEBRERO SISTEMA\HC OCUPACIONAL\form_077-inicial_1.pdf';
$content = file_get_contents($file);

// Extract text between parentheses (standard PDF text strings)
// This is very basic and won't handle all encodings, but might catch labels
preg_match_all('/\((.*?)\)/', $content, $matches);

echo "--- TEXTO EXTRAÍDO DEL PDF ---\n";
foreach ($matches[1] as $text) {
    // Filter out garbage
    if (strlen($text) > 3) {
        echo $text . "\n";
    }
}

// Extract text from stream blocks if compressed (might need zlib)
// Many PDFs are compressed, so this might fail without inflating.
// Let's try to uncompress streams if possible? Standard PHP doesn't easily do it without knowing offsets.
// But let's see what we got from the simple regex first.
?>