feat(edit): add comments, highlights and drawing annotations (#8) - #63
Merged
McanKul merged 3 commits intoAug 29, 2026
Merged
Conversation
McanKul
requested changes
Aug 28, 2026
McanKul
left a comment
Owner
There was a problem hiding this comment.
Thanks for the contribution. One production blocker before merge: if qpdf --flatten-annotations=all fails, apply_markup_annots still strips the markup annotations and returns success. That can publish a PDF with the annotations removed but not flattened. Please propagate the flatten error instead and add a regression test for the qpdf failure path. Please also rebase onto current development after #55.
…e, strikeout, ink) Write real /Annots dictionaries after overlay: QuadPoints, appearance streams, session-only delete, leftover copy-through including /Link. Opt-in flatten uses qpdf --flatten-annotations=all. Draw ink stays a stamp. Fixes McanKul#8.
Propagate qpdf --flatten-annotations=all errors instead of stripping markup and returning success. Dest keeps annotations when flatten fails.
Complete-empty L7 rewrite must not run on stamp-only or markup-only export, or leftover /Link is deleted. Only wipe dest supported links when the document is empty and flatten is off.
nonamexishere
force-pushed
the
feat/8-comments-highlights
branch
from
August 28, 2026 20:09
e32eafc to
7b551b5
Compare
McanKul
approved these changes
Aug 29, 2026
McanKul
left a comment
Owner
There was a problem hiding this comment.
Thanks for addressing the review feedback and adding the regressions. The updated annotation workflow looks good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/Type /Annot+ subtype,/C,/T, optional/Contents,/AP)./QuadPoints(not only/Rect). Markup ink writes/InkList. Draw (kind: "ink") stays a content stamp./Linkand markup that already has/NM) copy through.qpdf --flatten-annotations=all). Default off. Save still goes through the test(editor): validate and round-trip edited PDF outputs before publish #34 gate. Original file is never overwritten.Fixes #8.
Test plan
cargo test --lib edit_annots(C1–C9)npm test(includesmarkupObject.test.ts)npm run typecheckcargo test --libclean-markup.pdfdest has five/Annotswith/T Ada, highlight/QuadPoints,/AP