Windows annotation removal
Ordinary loaded Windows documents use THPDFWindowsFormDataTransaction.RemoveAnnotations to prepare annotation removals through the native policy engine
Create the transaction with the current document and the original source that exactly corresponds to its loaded revision; the bridge privately prepares the current graph and loads a separate candidate
Select annotations using zero-based page and exact Unicode name identities, then inspect ChangedAnnotations and copy the prepared PDF with WritePreparedPDF
Publish all required PDF and result data before transferring ownership with TakeCandidate; discard a failed transaction without replacing the caller's document or source
The removal counter includes cascading popup and reply removals; it does not change the append-count contract of the existing mapped XFDF import method
File jobs
The ordinary JSON job entry point accepts type: "annotations.remove", a source input path, a separate output path and an annotations identity array
{
"schemaVersion": 1,
"type": "annotations.remove",
"input": "source.pdf",
"output": "removed.pdf",
"annotations": [{"page": 0, "name": "review-note"}]
}
The job prepares and flushes a temporary PDF before atomically replacing the destination; failures before replacement preserve the destination and clean up the temporary file it owns
The result contains removed, mediaType: "application/pdf" and annotationProfile: "page-and-nm-removal-v1"; an unmatched request returns zero and retains the current PDF bytes
Windows C ABI callers can use the same removal schema with callback IO; explicit input IO is staged independently of the handle's current document until both PDF and result publication succeed
See callback operation and commit details for the distinction between sink bytes already written and the handle's committed document state
Boundary
Widgets require a field-tree deletion policy and are rejected by this page-annotation operation; incremental removal retains historical bytes and must not be used as secure erasure
Encrypted permissions, certification restrictions, working budgets and cancellation remain active in the Windows bridge