pdftract/test_fingerprint_debug.rs
jedarden 432514d350 wip: AcroForm improvements, debug tooling, test corpus, and fixture updates
Collects in-progress work across forms (Ch/Tx field handling, value_text
edge cases), layout corrections, stream parser fixes, conformance test
expansion, security audit test (TH-08), stream-decoder bomb fixture,
debug examples reorganization under examples/debug/, sdk module scaffold,
xtask CLI enhancements, and provenance entries for new fixtures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 09:48:14 -04:00

13 lines
600 B
Rust

use pdftract_core::fingerprint::canonicalize::normalize_content_bytes;
fn main() {
let v1 = b"\n BT\n /F1 12 Tf\n 50 700 Td\n (Hello World) Tj\n ET\n ";
let v2 = b"\n BT\n /F1 12 Tf\n 50 700 Td\n (Hello Worl) Tj\n ET\n ";
let norm1 = normalize_content_bytes(v1);
let norm2 = normalize_content_bytes(v2);
println!("v1 normalized ({} bytes): {:?}", norm1.len(), String::from_utf8_lossy(&norm1));
println!("v2 normalized ({} bytes): {:?}", norm2.len(), String::from_utf8_lossy(&norm2));
println!("Equal: {}", norm1 == norm2);
}