Fork upstreamu saber-notes/saber (v1.38.0) kvôli oprave rozmazaných importovaných PDF strán pri priblížení. Zadanie: PROBLEMS.md
  • Dart 96.2%
  • C++ 1.1%
  • CMake 0.8%
  • Shell 0.7%
  • Kotlin 0.5%
  • Other 0.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Last Husky bf020702d7
Some checks failed
Run tests / Run Flutter tests (pull_request) Failing after 27s
Run tests / Run Flutter tests (push) Failing after 15s
fix(editor): re-rasterise imported PDF pages when zooming in
Imported PDF pages stayed blurry when zoomed in: pdfrx rasterises a
PdfPageView from its *layout* box (`constraints * devicePixelRatio`, capped
by `maximumDpi`) and keeps that raster as long as the layout does not change.
The editor canvas zooms by scaling a Transform matrix, so the layout of the
page never changes and the fit-to-screen raster was simply upscaled — the
blur factor equalled the zoom factor (2x zoom = 2x upscale, 4x = 4x).

What changed:

* `CanvasZoomScope` — exposes the canvas' TransformationController to the
  widget tree below the interactive canvas (canvas_gesture_detector.dart), so
  widgets whose quality depends on the zoom can read it.
* `PdfPageZoomView` — replaces the bare `PdfPageView` of `PdfEditorImage`.
  It listens for zoom changes, and **after the gesture settles** (250 ms
  debounce, so nothing stutters or flickers mid-gesture) reports a larger
  `devicePixelRatio` to the pdfrx subtree. pdfrx then rasterises the same
  layout at that much higher resolution and fits it back into the unchanged
  layout box, so:
  - the page geometry, the canvas transform and every annotation coordinate
    stay exactly where they were,
  - during a gesture the existing raster is just scaled by the canvas (no
    re-render, no dropped frames),
  - `maximumDpi` follows the requested raster scale, otherwise pdfrx's
    default 300 DPI would clip every zoomed-in render back to fit-to-screen.
  The raster is capped to `maxRasterPixels` (24 MP ≈ 96 MB) computed from the
  area the page really covers in the layout, so a letterboxed 16:9 slide may
  go sharper than a full A4 page, and a page that leaves the viewport frees
  its raster. Thumbnails and previews never see a zoom scope, so they keep
  rendering exactly as before.

Measured on a real 16:9 imported deck (1000 × 562.5 pt) at devicePixelRatio 2:

| zoom | before            | after              |
|------|-------------------|--------------------|
| 1x   | 1600 px, 115 DPI  | 1600 px, 115 DPI   |
| 2x   | 1600 px, 115 DPI  | 3200 px, 230 DPI   |
| 4x   | 1600 px, 115 DPI  | 6400 px, 461 DPI (23 MP) |

Tests:

* `test/editor_pdf_zoom_test.dart` — the raster-scale maths (memory budget,
  letterboxed pages, degenerate inputs).
* `test/editor_pdf_zoom_render_test.dart` — end-to-end with a real PDF through
  pdfium: the raster pdfrx produces is 400 px at fit-to-screen, stays 400 px
  while the zoom changes, becomes 800 px once the gesture settles, and drops
  back to 400 px when zoomed out again.

`flutter analyze` is clean. `flutter test` has no new failures: the 12 golden
tests in `sbn_test.dart`/`screenshot_goldens_test.dart` that fail here fail
identically on the unmodified `main` in this environment.

Refs #1
2026-11-28 19:14:31 +01:00
.github ci: remove webkit2gtk-4.1-dev from dependencies 2026-11-24 02:01:05 +00:00
.vscode dev: add Zed IDE config 2025-11-23 02:06:15 +00:00
.zed dev: add Zed IDE config 2025-11-23 02:06:15 +00:00
android i18n: auto translations 2026-11-13 02:21:46 +00:00
assets tweak: better android monochrome icon 2026-01-16 16:15:57 +00:00
assets_raw chore: vectorize app store badges 2025-12-02 14:23:27 +00:00
flatpak v1.38.0 2026-11-21 20:24:06 +00:00
installers v1.38.0 2026-11-21 20:24:06 +00:00
ios i18n: apply strings 2026-11-13 01:37:13 +00:00
lib fix(editor): re-rasterise imported PDF pages when zooming in 2026-11-28 19:14:31 +01:00
linux perf: remove unused WebKitGTK/WebView2 dependency 2026-11-21 19:55:58 +00:00
macos perf: remove unused WebKitGTK/WebView2 dependency 2026-11-21 19:55:58 +00:00
metadata v1.38.0 2026-11-21 20:24:06 +00:00
packages chore: update flutter to 3.50.0 2026-11-13 12:36:00 +00:00
patches v1.38.0 2026-11-21 20:24:06 +00:00
scripts i18n: auto translations 2026-11-13 02:21:46 +00:00
shaders perf: matrix approach to inverting 2024-11-04 00:51:09 +00:00
snap v1.38.0 2026-11-21 20:24:06 +00:00
submodules chore: update flutter to 3.50.1 2026-11-21 16:08:25 +00:00
test fix(editor): re-rasterise imported PDF pages when zooming in 2026-11-28 19:14:31 +01:00
windows v1.38.0 2026-11-21 20:24:06 +00:00
.gitattributes Initial commit 2022-07-21 00:04:15 +01:00
.gitignore fix: appimage zsync url (#1822) 2026-09-04 01:23:13 +01:00
.gitmodules chore: remove unused flatpak manifest 2025-10-18 18:29:10 +01:00
.metadata perf: hide linux window until first frame 2025-11-02 17:47:27 +00:00
.weblate dev: add weblate config file 2025-08-04 21:20:05 +01:00
analysis_options.yaml chore: exclude metadata from dart analyzer 2026-08-21 00:04:22 +01:00
devtools_options.yaml feat: log to devtools too 2024-05-23 03:37:54 +01:00
LICENSE.md Create LICENSE.md 2022-07-22 23:42:11 +00:00
pricing-cs.md i18n: Update Czech (#1078) 2024-01-09 22:29:37 +00:00
pricing.md i18n: Update Czech (#1078) 2024-01-09 22:29:37 +00:00
privacy_policy.md privacy: clarify data may pass through UK 2026-08-30 20:50:39 +01:00
PROBLEMS.md docs: zadanie opravy rozmazaných importovaných PDF strán 2026-11-28 17:12:31 +01:00
pubspec.lock perf: remove unused WebKitGTK/WebView2 dependency 2026-11-21 19:55:58 +00:00
pubspec.yaml v1.38.0 2026-11-21 20:24:06 +00:00
README-ar.md v1.38.0 2026-11-21 20:24:06 +00:00
README-cs.md v1.38.0 2026-11-21 20:24:06 +00:00
README-de.md v1.38.0 2026-11-21 20:24:06 +00:00
README-id.md v1.38.0 2026-11-21 20:24:06 +00:00
README-vi.md v1.38.0 2026-11-21 20:24:06 +00:00
README-zh-CN.md v1.38.0 2026-11-21 20:24:06 +00:00
README-zh-TW.md v1.38.0 2026-11-21 20:24:06 +00:00
README.md v1.38.0 2026-11-21 20:24:06 +00:00
slang.yaml chore: disable stats on generated slang file 2023-12-05 18:43:40 +00:00
test.sh fix(dev): podman container always recreated 2026-11-13 15:09:26 +00:00

Logo Saber

Get it on Google Play   Get it on F-Droid   Download on the App Store   Download for Windows   Download on Flathub   Get it as an AppImage

English | čeština | Deutsch | 中文 (简体中文, 中国) | 中文 (繁體, 台灣) | العربية | Tiếng Việt | Bahasa Indonesia

Saber is the notes app built for handwriting.

It's designed to be as simple and intuitive as possible, while still delivering unique features that you'll actually use. Additionally, Saber is available across all your devices, large and small, and syncs between them seamlessly.

Notably, it can invert your notes when you're in dark mode. This allows you to write with white ink on a black background, which is much easier on the eyes in low-light environments like when the teacher turns off the lights in class. Images and PDFs are also inverted, so you can still use a digital printout or a textbook without the fuss.

Saber uses a dual-password system to protect your notes from anyone but you, even if they have complete control over the server. You can safely store your notes on the official Saber server, another server, or even host your own!

The app is completely open-source so that anyone can view the source code and see exactly what it's doing and how it handles your data. Many other note-taking apps are closed-source and proprietary, meaning that their inner workings are a mystery to the public.

As someone who studies maths, highlighting multi-line equations was always a hassle with other apps, where the highlighter would change color when it overlapped with itself. Another problem I had was that in some apps, the highlighter would render on top of the text, fading it out and making it hard to read. Saber's highlighter has no such issues. It utilizes canvas compositing to render the highlighter in a way that is consistent with/better than traditional paper, where it handles overlaps and maintains color consistency.

Saber has everything you need to keep your notes organized. Create folders inside folders inside folders to your heart's content with no limit on the number of nested folders. And even though a note may be buried deep within a nested folder, you can still access it easily with your most recent notes always available on the home screen.

Discover a whole new way to capture and organize your thoughts with Saber. Whether you're a student, professional, or creative mind, Saber is your trusted companion for digital handwriting. Download now and let your ideas flow freely!

Latest release Flathub F-Droid GitHub downloads Flathub downloads GitHub Sponsors License Translation status Codecov

Tap to show/hide screenshots

Features

Please see #1 Saber progress.

Install

Please see Install Saber on the wiki.

Build from source

Please see Build Saber on the wiki.

Translating

All translations are thanks to our community of contributors.

If you'd like to help out translating Saber, head to Weblate!

Translation status

Note: To avoid falling back to English, any gaps in the translations are filled in by machine translation until a human can contribute.

Supporting Saber

If you like Saber, please consider supporting it by:

  • Spreading the word!
  • Starring the project on GitHub
  • Sponsoring me on GitHub Sponsors
  • Donating via PayPal
  • Buying more storage on the Nextcloud server: see Pricing

Development notes

Please see Maintainer notes on the wiki.