feat(pdf): rebuild editor on vector PdfViewer

Replace the single-page PdfPageView bitmap with a pdfrx
PdfViewer: real vector text, continuous scroll, native
pinch-zoom (no custom zoom solver, so no zoom-jump here).

Ink is glued per-page via pageOverlaysBuilder; the pen is
captured at the viewer level by PenCaptureRegion while touch
falls through to scroll / pinch / text-select.

Add select-text -> highlight via PdfTextSelectionParams: the
selection's fragment rects are stored as normalized page rects
and drawn under the ink. In-memory only for now.

Per-page persistence, undo/redo, tools, colors, thumbnails and
pen settings are reused verbatim. analyze clean, 270 tests green.
This commit is contained in:
2026-06-24 02:32:41 +08:00
parent f41df2033f
commit db6e3842c7
6 changed files with 650 additions and 366 deletions

View File

@@ -155,6 +155,12 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get nextPage => '下一页';
@override
String get toolSelectText => '选择文字';
@override
String get actionHighlightSelection => '高亮所选';
@override
String failedToOpenPdf(String error) {
return '打开 PDF 失败:\n$error';