qrdm.verify_qr_pdf¶
- qrdm.verify_qr_pdf(input_file: str | Path | bytes | BytesIO, *, reject_unexpected_codes: bool = False, strict: bool = False, max_payload_size: int = 5242880) VerifyResult[source]¶
Verify a QRDM PDF document and return a detailed report without writing files.
- Performs named checks:
payload_valid: whether QR payloads and Reed-Solomon symbols decode cleanly
hash_matches: whether the reconstructed payload matches the document SHA-256
code_count_correct: whether all expected sequence numbers were decoded
no_unexpected_codes: whether any non-QRDM or malformed barcodes were detected
- Parameters:
input_file (Path-like, bytes, or io.BytesIO) – Path or stream to the QRDM PDF.
reject_unexpected_codes (bool, optional) – If True, marks verification as failed if non-QRDM barcodes are found.
- Returns:
Structured verification report containing status, check flags, and metadata.
- Return type: