Reconstruction of Time-Series Data from ECG PDFs: A Lightweight and Accurate Approach for Clinical Applications (Preprint)
<sec> <title>BACKGROUND</title> 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. </sec> <sec> <title>OBJECTIVE</title> 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. </sec> <sec> <title>METHODS</title> 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. </sec> <sec> <title>RESULTS</title> 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. </sec> <sec> <title>CONCLUSIONS</title> 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. </sec>
Authors
- Chengshu Wang (ORCID: https://orcid.org/0000-0003-1477-1466)
- Ming‐Shien Wen (ORCID: https://orcid.org/0000-0002-0056-7985)
- Po-Yen Huang
- Shian‐Sen Shie (ORCID: https://orcid.org/0000-0001-6891-5205)
Publication Details
- Published
- 2025-07-13
- DOI
- https://doi.org/10.2196/preprints.80597
- Primary Topic
- ECG Monitoring and Analysis
- Type
- article
- Field-Weighted Citation Impact
- 0.00