Conversation
A landscape page does not fit a portrait screen the right way up, so the device turns it: the page's width runs along the long side of the screen and the ink is written turned with it. The renderer draws that ink straight, which puts annotations sideways on every landscape document. Reported in ddvk#286. Worked out by plotting the raw stroke coordinates of a page into the screen's own 1404x1872 frame, where the handwriting reads sideways, and checked against the same page exported by the tablet itself. Turning it gives one uniform scale, the page width over the screen's long side: 0.5143 points per pixel across and 0.5146 down on a 960x540 page. On that page the tablet puts the ink at x 302.0..895.3, y 116.7 down from the top. With this it lands at x 302.7..894.0, y 117.3. The tablet grows the sheet to take in writing past the page edge, which is why its ink carries on past where this clips. pageTransform carries how a page is laid out rather than a bare scale, so the turned and unturned cases sit side by side instead of inside a ratio test. Portrait pages keep the scale they had.
This was referenced Sep 12, 2026
Open
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.
Fixes #286, which has been open since January 2024.
A landscape page does not fit a portrait screen the right way up, so the device turns it a quarter turn: the page's width then runs along the long side of the screen, and the ink is written turned with it. The renderer draws that ink straight, so annotations on any landscape document come out sideways and mostly off the page.
The thread on #286 stalled on whether the firmware supported landscape at all. It does, and this is a renderer bug, not a device one.
How it was worked out
Plotting the raw stroke coordinates of a page into the screen's own 1404x1872 frame shows the handwriting reading sideways, which is the whole diagnosis. Turning it gives one uniform scale, the page width over the screen's long side: 0.5143 points per pixel across and 0.5146 down on a 960x540 page. Two axes agreeing to three decimal places is what says the model is right rather than fitted.
Checked against the same page exported by the tablet itself:
The tablet grows the sheet to take in writing past the page edge, which is why its ink carries on past where this clips.
The change
pageTransformcarries how a page is laid out rather than a bare scale, so the turned and unturned cases sit next to each other instead of inside a ratio test. Portrait pages keep exactly the scale they had, so nothing changes for them. The highlighter, which is drawn as one straight swipe, is flattened along whichever way the page runs.Something to know when you test this
Verifying it is harder than it should be because of #228: the exporter pairs the nth annotated page with background page n, rather than with the page the ink belongs to. On the 28 page document I used, page 8's ink is drawn over background page 3. So a landscape document will still look wrong after this change, for that separate reason. I measured the ink position rather than trusting the rendered page, which is why the numbers above are ink bounding boxes and not screenshots.
That second bug is not addressed here.