This research proposes a novel method for document image segmentation and classification using an extreme learning machine (ELM) based on header blocks. By employing particle swarm optimization (PSO) for segmentation and gray level co-occurrence matrices for feature extraction, the study achieves an accuracy of 82.3%, outperforming traditional support vector machines with an accuracy of 64.7%. The method effectively categorizes documents into distinct sections such as headings, headers, footers, and author names, enhancing the efficiency of document analysis.