For rule-based PDF parsing or model field extraction, keep the issued property invoice, its order snapshot, and the evidence connecting extracted fields to that snapshot. That is the least complicated starting point for an audit trail. The bill includes extraction attempts, human review, retained document versions, and later retrieval; retaining every intermediate representation adds another term before it adds a defensible answer to a tenant's dispute.
Short answer: compare rule-based PDF parsing with model-based field extraction on accepted field accuracy and retained evidence per issued invoice. Use rules where the document structure is controlled, and test a model where variation defeats those rules. Neither approach earns permission to sign a generated invoice merely by producing plausible fields. Preserve the input, check the values against the order, and bind the approved result to the exact document issued.
Consider an illustrative retention budget, not a measured workload: 10,000 invoices, each with a 200 KB source, a 200 KB issued document, and eight 100 KB intermediate artifacts. Using decimal units, that is 4 GB for source and issued files, plus 8 GB for intermediates. Intermediates dominate this example. Keeping two of those artifacts instead of eight reduces that term to 2 GB, while leaving the two documents intact. This calculation says nothing about actual service rates or which cost dominates a real deployment; it identifies the term a retention decision can move.
For property management, the uncomfortable question is what disappears with those six artifacts. A layout preview may be disposable. Evidence explaining why a disputed charge entered a signed invoice may not be.
What evidence should rule-based PDF parsing and model extraction retain?
Start with the dispute rather than the parser. Suppose an order contains a property identifier, a lease reference, a service period, a currency, and an approved charge. The generated PDF is the issued representation of those values. If an incoming PDF supplies any of them, that extraction becomes part of the evidence chain; if the order already supplies them authoritatively, parsing the generated invoice should be a verification step, rather than a new source of business truth.
This distinction limits the job.
The broader question about rule-based parsing versus model-based extraction, including resume parsing, concerns how faithfully fields can be recovered from varied documents. Here, the acceptance boundary is narrower: can the recovered fields support this particular invoice, and can someone later explain the decision to issue it? A resume extractor's tolerance for an approximate job title would be an inappropriate policy for a rent amount. That is a proposed acceptance distinction, not a claim about either technology's measured accuracy.
Retain the boundary.
An audit record should connect an input document version, an order snapshot, an extraction attempt, a field decision, a rendering revision, and a signing decision. Treat these as separate records with explicit relationships. A parser revision is not an order revision, and a retry is not a new business approval. Replacing one field in a mutable record until it looks correct makes later reconstruction dependent on whatever happened to survive in logs.
ISO 32000-2 is the PDF specification reference for the document format. It does not provide a benchmark establishing that a particular extraction method is accurate for these invoices. Nor should a citation to a document format substitute for the signature acceptance policy, retention requirement, or evidence needed by the organization receiving the invoice.
Rules and models lose fidelity in different places
Separate field fidelity from document fidelity. For this pipeline, define field fidelity as agreement with approved order values, and document fidelity as agreement between those values and the issued representation, including the association between a charge, its service period, and its property. These are proposed evaluation definitions. They prevent a readable PDF from being mistaken for a correct invoice.
Rules make assumptions inspectable: a label, a coordinate region, or a known template revision can explain why a value was selected. That makes a controlled document family a sensible place to test them first. It also creates a specific failure mode to test: template drift can leave a rule selecting a neighboring value while still returning a syntactically valid amount. A successful parse is weak evidence if the selected charge belongs to another unit.
A model provides a different candidate mechanism for varied labels and layouts, but semantic plausibility needs an explicit rejection path. Test whether the extractor fills a missing property identifier, confuses subtotal with amount due, or associates a charge with the wrong service period. These are test cases, not allegations about an unnamed implementation. The relevant result is how often the entire accepted invoice is correct under the same review policy.
| Decision boundary | Rule-based candidate | Model-based candidate | Evidence to keep |
|---|---|---|---|
| Controlled template | Explicit selectors tied to a revision | Structured field output under a fixed configuration | Input version and configuration revision |
| Unfamiliar layout | Reject unmatched assumptions | Produce candidates subject to validation | Selected source region or explicit lack of provenance |
| Missing required field | Fail the required-field check | Reject unsupported completion | Rejection reason and review decision |
| Disputed signed invoice | Reconstruct the original field selection | Inspect the original accepted output | Issued bytes and approval linkage |
There is no defensible universal accuracy percentage in a format specification. Build a labeled set from authorized examples, separate template families when evaluating changes, and report rejected invoices alongside accepted errors. An extractor that sends almost everything to review can appear excellent if its report only counts the few invoices it accepts.
The denominator matters.
Make the signing boundary smaller than the extraction pipeline
The proposed signing gate accepts an approved invoice record and a specific rendered artifact. It should require exact agreement for identifiers and currency, plus a documented numeric representation for amounts, before authorization can proceed. Signature validation and the organization's requirements for signer identity remain separate checks; a signature decision must not silently stand in for business validation.
For example, the following Python illustrates a field gate using synthetic order data. It does not parse PDFs, validate signatures, or establish legal sufficiency. Values are strings deliberately: converting monetary inputs through binary floating-point would introduce an unnecessary representation decision into this example.
from decimal import Decimal, InvalidOperation def validate_candidate(order, candidate): for field in ("property_id", "lease_ref", "period", "currency"): if candidate.get(field) != order[field]: raise ValueError(f"Mismatch or missing value: {field}") try: amount = Decimal(candidate["amount"]) approved = Decimal(order["amount"]) except (KeyError, InvalidOperation, TypeError, ValueError) as exc: raise ValueError("Invalid amount") from exc if not amount.is_finite() or amount != approved: raise ValueError("Amount requires review") order = { "property_id": "PROPERTY-17", "lease_ref": "LEASE-42", "period": "2026-11", "currency": "USD", "amount": "1250.00", } validate_candidate(order, dict(order)) Passing this function establishes only its stated comparisons. It does not establish that the PDF displays them correctly. Test that boundary separately with missing labels, repeated amounts, multi-property statements, and documents whose visible content disagrees with extracted text. Require review when the evidence cannot support the association, even if every returned value has the right type.
Keep issuance idempotent at the business-record level: a retried extraction should reference its prior attempt, and a retried render should not authorize another invoice. Record which approved artifact reached signing. Otherwise a retry can create two individually plausible histories with no clear answer about which document was issued. Consider the test case where an extraction is accepted, a render is produced, and a worker restarts before recording completion: the retry needs to discover the already approved record and its artifact, rather than manufacture a fresh approval from the same candidate fields. Test the interruption at each boundary. The point of keeping those relationships is to make recovery depend on recorded decisions instead of a worker's memory.
Spend retention on reconstructing decisions
Storage capacity alone is an incomplete budget.
Count attempts per accepted invoice, review work, retained bytes, and retrieval work for a dispute. Keep the units separate until local rates and observed volumes make a monetary comparison possible. No unit price is needed to discover that a model fallback invoked repeatedly on an unchanged input creates more attempts without adding new business information.
Instrument the boundaries with input version, attempt identifier, extraction configuration, validation outcome, approval reference, and issued-artifact reference. Measure rejected invoices and accepted discrepancies separately. Keep tenant details out of routine metric labels; investigation records can carry the restricted evidence needed to diagnose a particular decision.
Deploy a parser or model configuration change against a held-out document set before allowing it to influence issuance, then compare candidate decisions with approved results. A small team may prefer fewer extraction paths because each path needs fixtures, review behavior, and retention policy. A broader pipeline may justify that maintenance when its additional accepted documents survive the same checks. Treat the maintenance burden as an explicit trade-off.
The durable record should preserve the original input, the accepted extraction output, the order snapshot, the issued document, and the evidence required to assess its approval and signature. Give intermediate previews and redundant retry artifacts an explicit expiry policy, subject to applicable retention requirements, rather than inheriting indefinite storage from a debugging session. Storage protection and access control must cover the relationships as well as the files: preserving an invoice without its approval linkage leaves an audit question unanswered.
Stop keeping redundant previews after the investigation window closes. That choice sacrifices the ability to reconstruct every transient rendering state, and deleting rejected extraction outputs can also prevent comparison with an earlier rejected candidate. Preserve those outputs selectively when the reason for rejection matters. The retention boundary is acceptable only when the team can still explain the issued charge and identify the exact approved document; if those answers depend on an artifact, that artifact has not earned deletion.
Further reading
References:
- ISO 32000-2, Portable Document Format specification: https://www.iso.org/standard/75839.html

