Product: PDFTron.iOS and PDFTron.iOS.Tools
Product Version: 11.3.0
Please give a brief summary of your issue:
We are facing a consistent issue in PDFTron iOS where annotation deletions are not persisted when all annotations are removed from a document.
Please describe your issue and provide steps to reproduce it:
Observed behavior:
-
If a PDF contains N annotations:
-
Deleting N-1 annotations works correctly
-
The remaining annotations are saved properly via XFDF
-
-
However:
-
The last remaining annotation cannot be deleted
-
If all annotations are erased at once, none of the deletions are persisted
-
On reopening the document, all annotations reappear
-
-
This behavior is not related to a specific annotation type:
-
It occurs for ink, shapes, comments, etc.
-
Any single annotation can act as the “last one”
-
At least one annotation must remain for deletions to persist
-
Expected Behavior
-
Deleting all annotations should result in:
-
XFDF correctly representing an empty annotation state
-
Reopening the document with zero annotations
-
Actual Behavior
-
When annotation count reaches zero:
-
PDFDoc.FDFExtract(e_annots_only).SaveAsXFDF()does not reflect deletions -
The last annotation appears to be deleted visually but is not persisted
-
XFDF export does not represent the “all annotations deleted” state
-
Reproduction Steps
-
Open a PDF with multiple annotations
-
Erase all annotations
-
Save annotations using XFDF export
-
Reload document / reapply XFDF
Result:
All annotations reappear
Control case:
If at least one annotation remains → deletions persist correctly