This novel method reconstructs time-series ECG data from PDF files, indicating improved accessibility and accuracy in clinical applications.
BACKGROUND Electrocardiogram (ECG) data are critical for clinical decision-making and cardiology research. However, many ECG systems only provide graphical outputs in PDF format, limiting access to raw time-series data. Existing solutions, such as image processing and deep learning-based digitization, are computationally intensive, error-prone, and often fail to handle diverse ECG formats or noisy data. OBJECTIVE This study aims to develop and validate a lightweight, accurate method for reconstructing near-original ECG time-series data directly from PDF files, without relying on image processing, deep learning, or intermediate SVG conversion. METHODS We utilized ECG PDFs generated by the MUSE system, focusing on the 12-lead ECG format. Using PdfFileAnalyzer, we directly parsed path objects embedded in the PDF files to extract waveform coordinate data. Each lead's signal was reconstructed by mapping the x- and y-coordinates into time and voltage values, calibrated against the reference 1 mV marker within each PDF. The method was validated using 5,000 randomly selected ECG PDFs with available original time-series data as ground truth. We evaluated reconstruction accuracy using mean absolute error (MAE), root mean square error (RMSE), and Pearson correlation coefficients. RESULTS The reconstructed ECG waveforms demonstrated high fidelity to the original signals, with an average MAE of ~0.008, RMSE of ~0.01, and Pearson correlation coefficients consistently approaching 1.0 across all 12 leads. Each reconstructed signal contained exactly 5,000 data points, matching the resolution of the ground truth. The complete dataset was processed in 36 minutes on a standard desktop computer with an Intel i7 CPU and 4 GB RAM, highlighting the method's computational efficiency. Attempts to extract signals via PDF-to-SVG conversion were unsuccessful in multiple cases, further supporting the robustness of the proposed direct parsing method. CONCLUSIONS This study introduces a novel, resource-efficient approach for reconstructing ECG time-series data directly from PDF files by parsing vector path objects. The method provides near-perfect reconstruction accuracy without the need for complex computational infrastructure or large training datasets. It enables scalable ECG data extraction for clinical diagnostics and research, facilitating broader ECG data accessibility and promoting innovations in cardiovascular care.
No takes yet. Share an insight, caveat, or question.
Shie et al. (2025) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: