mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-11 02:41:31 -06:00
doc_info (and the MCP document-info resource built on it) serialised annotation and link rectangles straight from the PDF /Rect, in user space, while every other tool reports and accepts rectangles with the origin at the top-left of the displayed page. Feeding a doc_info rect to link_edit therefore moved the link, and on rotated pages the two conventions disagreed in more than a y flip. Convert both through the page's user_to_view, the same conversion comment_list and link_list use, so the three agree. Pages that an annotation cannot be matched to keep the raw rect. Co-authored-by: wstock <1394687+wstock@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>