mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-09 12:32:52 +00:00
XFDF export and import carry each comment's formatting as XFDF 3.0 (ISO 19444-1) names it: contents-richtext (/RC), defaultstyle (/DS), width/style/dashes (/BS, or an older /Border), cloudy style and intensity (/BE), rotation, justification (/Q), fringe (/RD) on every type, leaderLength/leaderExtend/leader-offset and the caption attributes of lines, the caret symbol and redaction overlay text. A stamp's appearance travels as <appearance>: base 64 of the DICT/STREAM/ARRAY/NAME/INT/FIXED/BOOL/STRING/NULL XML other tools write, with stream data in DATA as XFDF 3.0 "Stream encoding" gives it. Copy and paste carries every comment's appearance. Import keeps an appearance it can read (never on a redaction mark), records an unreadable one in Report::skipped and draws the comment instead; it is bounded at 16 MiB per appearance, 64 MiB per import, 64 levels and 100,000 values. FDF export keeps /AP with the forms and images it draws (ISO 32000-2 §12.7.8.3.4); FDF import copies those streams into the document, once when shared, only for comments that land on a page, and no longer nulls values past 16 levels (a gradient stamp's shading functions sit deeper). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA