Compatibility and Fallback
About 873 words
Different apps support different levels. This page answers three questions: how a reader displays content it does not support; how a writer exports for lower-level apps; and how different versions stay compatible.
Principles
- COMPAT-1 A reader must not reject a whole file because it contains content the reader does not support. Core content (multiple pages, strokes, basic shapes) must be displayed normally.
- COMPAT-2 Fallback affects only the current display and must not be written back to the source file automatically.
- COMPAT-3 When a file contains content the reader does not support, saving should default to Save As; the original file may be overwritten only after the user explicitly confirms that content may be lost (see TYPE-12).
- COMPAT-4 When the result after fallback may differ from what the original app shows, the reader should tell the user, for example "This file uses the Inkeys eraser; this app cannot display the erasing effect".
Reading fallback
| Content | Level | Display when not supported |
|---|---|---|
Block-level opacity | Basic | Drawn opaque |
| Highlighter | Basic | Drawn as Pen |
nib description | Basic | Circle nib, width treated as the diameter |
cap, lineCap, lineJoin | Basic | Round caps, round joins |
| Page background | Basic | Transparent or the app's default background |
dashArray, arrows, rounded corners | Basic | Solid lines, no arrowheads, square corners |
| Workspace type, PowerPoint binding | Standard | Displayed as normal whiteboard pages |
viewport | Standard | Displayed as { x: 0, y: 0, scale: 1 } |
| Shape object layer | Standard | Each part displayed as an independent Shape; cannot be edited as a whole |
| Image Media | Standard | Not displayed |
Shape preset construction | Full | Falls back to the object layer or plain Shapes; the page is not rejected |
| PDF, audio, video | Full | Layout placeholder kept, with a notice that it is not supported |
| Multiple layers | Full | Stacked by layerIndex from low to high and displayed as one layer |
| Multiple Devices | Full | Only the Canvases of the first registered Device are displayed, or the app lets the user choose |
| HDR colors | Full | fallback is used |
| Advanced Highlighter per-point styles | Full | Block-level color and opacity are used |
renderOnlyWhenLatest | Full | Ignored; the original and the corrected result are both displayed |
| Erase Ink | Inkeys | Must be skipped; must not be drawn as a normal pen (INK-11) |
| Clear | Inkeys | Recommended: display only the content after the last Clear; if that is not possible, tell the user the content may be incorrect (CLEAR-7) |
| Unknown blocks, keys, enum values | — | Handled according to TYPE-9, TYPE-8 and the fallback rules of each field |
Compatible export
A writer may produce a "compatible version for a target level": it uses only the capabilities of the target level so that lower-level apps get a picture as close as possible to the original app's.
- COMPAT-5 A compatible export must produce a compact file: each Canvas unique key appears only once.
- COMPAT-6 A compatible export must produce a new logical file (a new
Header.guid) and must not overwrite the original file.
| Content | When exporting to a level that does not support it |
|---|---|
| Erase Ink | Bake the erasing result into the stroke geometry: cut the erased Ink and Shape into the remaining pieces, and delete the Erase Ink |
| Clear | Delete the last Clear and all content before it |
renderOnlyWhenLatest | Delete the originals that are currently hidden, and remove the flag from the rest |
| Multiple layers | Merge into layer 0: write the content blocks one after another in layerIndex order |
| Multiple Devices | Export only the Canvases of one Device |
| May rasterize the current page into a PNG image Media; or delete it | |
| Image Media (exporting to Core or Basic) | May be deleted; bitmaps must not be converted into strokes |
| HDR colors, per-point styles | Keep only fallback and block-level styles |
| Opacity, nib, dashes and other appearance fields | Keep: lower-level readers ignore them automatically, and content positions are not affected |
Before bakingOne complete stroke plus one Erase Ink
- Stroke A
inkType 1undoId 0 - Erase
inkType 0undoId 1
→Bake
After bakingTwo complete strokes sharing the original undoId
- Piece A₁
inkType 1undoId 0 - Piece A₂
inkType 1undoId 0
Example: Inkeys exporting for ICC-CE
- Choose the target level: Standard (without the Inkeys extension).
- On each page, keep only the content after the last Clear.
- Bake the Erase Ink into the strokes; the pieces after cutting share the original
undoId. - Renumber
contentIdandundoId, and write a compact file in the recommended order.
Version compatibility
| Scenario | Behavior |
|---|---|
| A 1.1 reader opens a 1.0 file | Full compatibility is not guaranteed; best-effort reading (VER-5) |
| A 1.0 reader (updated per the errata) opens a 1.1 file | Ignores new fields and displays by the 1.0 rules; page-append files that have not been compacted may display incorrectly |
| A 1.0 reader (not updated) opens a 1.1 file | Refuses to read (the original 1.0 text only accepts version = 10) |
| A 1.1 reader opens a 1.2, 1.3… file | Best-effort reading (VER-4) |
| Any 1.x reader opens a 2.0 file | Refuses to read (VER-3) |
For the complete rules, see Versions and Changes.