Each object in a Pages document’s IWA
archives is a Protocol Buffers message. Apple has published neither the messages
nor their type numbers. This page and its companions list the message definitions that
Sean O’Brien’s iWorkFileFormat project recovered from Pages 5.0, Keynote 6.0 and
Numbers 3.0 (2013) with its proto-dump tool; later versions of Pages add
fields and messages that are not listed here. This page covers the shared value types,
the persistence messages, the Pages document root and its settings, and the
document, undo and style sheet messages of the shared frameworks. Text is on
text and styles, shapes and images
on drawables, and the type
numbers on message type
numbers.
Reading the definitions
The definitions are in Protocol Buffers version 2 syntax. Each line gives the
field’s rule (required, optional or repeated),
its type, its name and its field number, which is the number written in the encoded
message; names are not stored in the file. A default in square brackets is the value
a reader assumes when the field is absent. [packed = true] means a
repeated number field is written as one length-delimited run of varints.
- Inheritance. iWork’s classes inherit from one another, and the
dump shows this as a field called
superthat holds the parent class’s message.TP.DocumentArchivehassuper(field 15), aTSA.DocumentArchive, whose ownsuperis aTSK.DocumentArchive. - References. A
TSP.Referenceholds theidentifierof another object, from that object’sArchiveInfo, in any.iwafile of the document. ATSP.DataReferenceholds the identifier of a data file listed inTSP.PackageMetadata. - “_null” fields. In style property messages, a boolean such as
font_name_nullnext tofont_namesays the property is explicitly unset, as opposed to absent (inherited). - Lost names. Where the dump shows enumeration values such as
TATvalue0, the programs did not carry the names; their meanings are not known from this source.
In the listings below the leading dot of fully qualified type names (as in
.TSP.Reference) is left out.
Shared value types (TSP)
Defined in TSPMessages.proto and used in every framework.
message Reference {
required uint64 identifier = 1;
optional int32 deprecated_type = 2;
optional bool deprecated_is_external = 3;
}
message DataReference {
required uint64 identifier = 1;
}
message Point { required float x = 1; required float y = 2; }
message Size { required float width = 1; required float height = 2; }
message Range { required uint32 location = 1; required uint32 length = 2; }
message Date { required double seconds = 1; }
message IndexSet { repeated TSP.Range ranges = 1; }
message Color {
enum ColorModel { rgb = 1; cmyk = 2; white = 3; }
required TSP.Color.ColorModel model = 1;
optional float r = 3;
optional float g = 4;
optional float b = 5;
optional float a = 6 [default = 1];
optional float c = 7;
optional float m = 8;
optional float y = 9;
optional float k = 10;
optional float w = 11;
}
message Path {
message Element {
required TSP.Path.ElementType type = 1;
repeated TSP.Point points = 2;
}
enum ElementType { moveTo = 1; lineTo = 2; quadCurveTo = 3; curveTo = 4; closeSubpath = 5; }
repeated TSP.Path.Element elements = 1;
}
message ReferenceDictionary {
message Entry {
required TSP.Reference key = 1;
required TSP.Reference value = 2;
}
repeated TSP.ReferenceDictionary.Entry entries = 1;
}
message PasteboardObject {
optional TSP.Reference stylesheet = 1;
repeated TSP.Reference drawables = 2;
repeated TSP.Reference styles = 3;
optional TSP.Reference theme = 4;
optional TSP.Reference wp_storage = 5;
optional TSP.Reference app_native_object = 6;
optional bool is_text_primary = 7 [default = false];
optional bool is_smart = 8 [default = false];
optional TSP.Reference guide_storage = 9;
}
message ObjectContainer {
optional uint32 identifier = 1;
repeated TSP.Reference objects = 2;
}
| Colour model | Fields used |
|---|---|
1 rgb | r, g, b and alpha a |
2 cmyk | c, m, y, k and a |
3 white | Grey level w and a |
Which channels each model uses is read from the field names; the dump does not say
more. Date.seconds is a number of seconds, but the dump does not give its
reference date.
Persistence messages (TSP)
ArchiveInfo and MessageInfo head every object (see
IWA archives).
PackageMetadata (type 11006) lists the components (the
.iwa files) and the data files of the document.
message ArchiveInfo {
optional uint64 identifier = 1;
repeated TSP.MessageInfo message_infos = 2;
}
message MessageInfo {
required uint32 type = 1;
repeated uint32 version = 2 [packed = true];
required uint32 length = 3;
repeated TSP.FieldInfo field_infos = 4;
repeated uint64 object_references = 5 [packed = true];
repeated uint64 data_references = 6 [packed = true];
}
message FieldInfo {
enum Type { Value = 0; ObjectReference = 1; DataReference = 2; Message = 3; }
enum Rule { IgnoreAndDrop = 0; IgnoreAndPreserve = 1; MustUnderstand = 2; NotSupported = -1; }
required TSP.FieldPath path = 1;
optional TSP.FieldInfo.Type type = 2 [default = Value];
optional TSP.FieldInfo.Rule rule = 3 [default = IgnoreAndDrop];
repeated uint64 object_references = 4 [packed = true];
repeated uint64 data_references = 5 [packed = true];
}
message FieldPath {
repeated uint32 path = 1 [packed = true];
}
message ComponentInfo {
required uint64 identifier = 1;
required string preferred_locator = 2;
optional string locator = 3;
repeated uint32 read_version = 4 [packed = true];
repeated uint32 write_version = 5 [packed = true];
repeated TSP.ComponentExternalReference external_references = 6;
repeated TSP.ComponentDataReference data_references = 7;
optional bool allows_duplicates_outside_of_document_package = 8 [default = false];
optional bool dirties_document_package = 9 [default = true];
optional bool is_stored_outside_object_archive = 10 [default = false];
}
message ComponentExternalReference {
required uint64 component_identifier = 1;
optional uint64 object_identifier = 2;
optional bool is_weak = 3;
}
message ComponentDataReference {
required uint64 data_identifier = 1;
}
message PackageMetadata {
required uint64 last_object_identifier = 1;
repeated TSP.ComponentInfo components = 3;
repeated TSP.DataInfo datas = 4;
repeated uint32 read_version = 5 [packed = true];
repeated uint32 write_version = 6 [packed = true];
}
message PasteboardMetadata {
repeated uint32 version = 1 [packed = true];
required string app_name = 2;
repeated TSP.DataInfo datas = 3;
optional string source_document_uuid = 4;
}
message DataInfo {
required uint64 identifier = 1;
required bytes digest = 2;
required string preferred_file_name = 3;
optional string file_name = 4;
optional string document_resource_locator = 5;
optional bytes source_bookmark_data = 6;
optional string pasteboard_external_file_path = 99;
}
message ViewStateMetadata {
repeated uint32 version = 1 [packed = true];
required string document_version_uuid = 2;
required TSP.ComponentInfo component = 3;
}
FieldInfowould let a reader handle fields it does not know (drop them, keep them, or refuse the file), but iWorkFileFormat found it absent from every archive it inspected.- A
DataInfonames a file inData/; itsidentifieris what aTSP.DataReferenceholds.file_nameis the name actually used when it differs frompreferred_file_name. - A
ComponentInfo’slocatororpreferred_locatoris the component’s file name inIndex, without.iwa.
Three older data messages, from TSPDatabaseMessages.proto, appear in
the database_… fields that some messages keep for documents converted
from earlier versions:
message DatabaseData {
required TSP.DataReference data = 1;
}
message DatabaseDataArchive {
optional TSP.Reference data = 1;
optional string app_relative_path = 2;
required string display_name = 3;
optional uint64 length = 4;
optional uint32 hash = 5;
required bool sharable = 6 [default = true];
}
message DatabaseImageDataArchive {
enum ImageType { unknown = 0; bitmap = 1; pdf = 2; }
required TSP.DatabaseDataArchive super = 1;
required TSP.DatabaseImageDataArchive.ImageType type = 2;
}
The document root (TP.DocumentArchive)
Type 10000, in Document.iwa. Its fields lead to everything else: the
body text storage, the floating drawables, the section, the theme, the style sheet
and the settings. The page size and margins are in points.
message DocumentArchive { // TP
required TSA.DocumentArchive super = 15;
optional TSP.Reference stylesheet = 2;
optional TSP.Reference floating_drawables = 3; // TP.FloatingDrawablesArchive
optional TSP.Reference body_storage = 4; // TSWP.StorageArchive, kind BODY
optional TSP.Reference section = 5; // TP.SectionArchive
optional TSP.Reference theme = 6; // TP.ThemeArchive
optional TSP.Reference settings = 7; // TP.SettingsArchive
optional TSP.Reference deprecated_layout_state = 11;
optional TSP.Reference deprecated_view_state = 12;
repeated TSP.Reference citation_records = 13;
repeated TSP.Reference toc_styles = 14;
repeated TSP.Reference change_sessions = 16;
optional TSP.Reference drawables_zorder = 20;
optional bool uses_single_header_footer = 21;
optional float page_width = 30;
optional float page_height = 31;
optional float left_margin = 32;
optional float right_margin = 33;
optional float top_margin = 34;
optional float bottom_margin = 35;
optional float header_margin = 36;
optional float footer_margin = 37;
optional float page_scale = 38;
optional bool layout_body_vertically = 39;
optional bool change_tracking_enabled = 40;
optional TSP.Reference tables_custom_format_list = 41;
optional uint32 orientation = 42 [default = 0];
optional string printer_id = 43;
optional string paper_id = 44;
optional bool change_tracking_paused = 45;
}
enum ViewScaleMode { // TP
ViewScaleMode_UserDefined = 0;
ViewScaleMode_FitWidth = 1;
ViewScaleMode_FirPage = 2; // spelt so in the dump
}
message ThemeArchive { // TP
required TSS.ThemeArchive super = 1;
}
message PlaceholderArchive { // TP
required TSWP.ShapeInfoArchive super = 1;
}
The comments naming the type a reference points to are this site’s, from the field
names; the dump only says TSP.Reference.
Document settings (TP.SettingsArchive)
Type 10012.
message SettingsArchive { // TP
enum FootnoteKind {
kFootnoteKindFootnotes = 0;
kFootnoteKindDocumentEndnotes = 1;
kFootnoteKindSectionEndnotes = 2;
}
enum FootnoteFormat {
kFootnoteFormatNumeric = 0;
kFootnoteFormatRoman = 1;
kFootnoteFormatSymbolic = 2;
kFootnoteFormatJapaneseNumeric = 3;
kFootnoteFormatJapaneseIdeographic = 4;
}
enum FootnoteNumbering {
kFootnoteNumberingContinuous = 0;
kFootnoteNumberingRestartEachPage = 1;
kFootnoteNumberingRestartEachSection = 2;
}
optional bool body = 1 [default = true];
optional bool headers = 2 [default = true];
optional bool footers = 3 [default = true];
optional bool preview = 4 [default = true];
optional bool copy_movies = 5 [default = true];
optional bool copy_assets = 6 [default = true];
optional bool placeholder_authoring = 7 [default = false];
optional bool links_enabled = 8 [default = true];
optional bool hyphenation = 9 [default = false];
optional bool use_ligatures = 10 [default = false];
optional bool toc_links_enabled = 11 [default = false];
optional bool show_ct_markup = 12 [default = true];
optional bool show_ct_deletions = 13 [default = true];
optional int32 ct_bubbles_visibility = 14;
optional bool change_bars_visible = 15 [default = true];
optional bool format_changes_visible = 16 [default = true];
optional bool annotations_visible = 17 [default = true];
optional bool document_is_rtl = 18 [default = false];
optional string decimal_tab = 20;
optional string language = 21;
optional string hyphenation_language = 22;
optional string creation_locale = 23;
optional string last_locale = 24;
optional string orig_template = 25;
optional string creation_date = 26;
optional string bibliography_format = 27;
optional TP.SettingsArchive.FootnoteKind footnote_kind = 30;
optional TP.SettingsArchive.FootnoteFormat footnote_format = 31;
optional TP.SettingsArchive.FootnoteNumbering footnote_numbering = 32;
optional int32 footnote_gap = 33;
optional bool section_authoring = 40 [default = false];
}
“ct” is change tracking. section_authoring is set in page layout
documents rather than word processing ones, going by its name; the dump does not say
so.
Sections, page masters and floating drawables
Margins and paper size moved from the section to the document root; the section
keeps them as OBSOLETE_… fields for older files. Headers and footers are
text storages referred to from page masters: one for the first page, and one each
for even and odd pages.
message SectionArchive { // TP, type 10011
optional bool OBSOLETE_shows_header = 1;
optional bool OBSOLETE_shows_footer = 2;
repeated TSP.Reference OBSOLETE_headers = 3;
repeated TSP.Reference OBSOLETE_footers = 4;
optional float OBSOLETE_left_margin = 5;
optional float OBSOLETE_right_margin = 6;
optional float OBSOLETE_top_margin = 7;
optional float OBSOLETE_bottom_margin = 8;
optional float OBSOLETE_header_padding = 9;
optional float OBSOLETE_footer_padding = 10;
optional float OBSOLETE_paper_width = 11;
optional float OBSOLETE_paper_height = 12;
optional bool OBSOLETE_landscape_mode = 13;
repeated TSP.Reference OBSOLETE_master_drawables = 14;
optional float OBSOLETE_header_margin = 15;
optional float OBSOLETE_footer_margin = 16;
optional bool inherit_previous_header_footer = 17;
optional bool page_master_first_page_different = 18;
optional bool page_master_even_odd_pages_different = 19;
optional uint32 section_start_kind = 20;
optional uint32 section_page_number_kind = 21;
optional uint32 section_page_number_start = 22;
optional TSP.Reference first_page_master = 23;
optional TSP.Reference even_page_master = 24;
optional TSP.Reference odd_page_master = 25;
optional string name = 26;
optional bool page_master_first_page_hides_header_footer = 28;
}
message PageMasterArchive { // TP, type 10143
repeated TSP.Reference headers = 1;
repeated TSP.Reference footers = 2;
repeated TSP.Reference master_drawables = 3;
}
message FloatingDrawablesArchive { // TP, type 10010
message DrawableEntry {
optional TSP.Reference drawable = 1;
}
message PageGroup {
required uint32 page_index = 1;
repeated TP.FloatingDrawablesArchive.DrawableEntry background_drawables = 2;
repeated TP.FloatingDrawablesArchive.DrawableEntry foreground_drawables = 3;
repeated TP.FloatingDrawablesArchive.DrawableEntry drawables = 4;
}
repeated TP.FloatingDrawablesArchive.PageGroup page_groups = 1;
}
message DrawablesZOrderArchive { // TP, type 10015
repeated TSP.Reference drawables = 1;
}
The values of section_start_kind and
section_page_number_kind are plain numbers in the dump, without named
values, and are not known from this source.
Layout hints and view state
Pages saves where it last broke pages and columns, so it can open a long document quickly, and the window and selection state. A reader that lays the text out itself can ignore these.
message AnchorPosArchive {
optional TSP.Reference attachment = 1;
optional TSP.Point position = 2;
}
message TargetHintArchive {
optional TSP.Point frame_origin = 1;
optional TSP.Size frame_size = 2;
optional TSP.Range range = 3;
optional int32 next_widow_pulls_down_from_char_index = 4;
optional TSP.Range anchored_range = 5;
optional int32 column_count = 6;
}
message PageHintArchive {
enum PageKind {
kPageKindNone = 0;
kPageKindText = 1;
kPageKindFiller = 2;
kPageKindOrphan = 3;
kPageKindEndnote = 4;
kPageKindDirty = 5;
kTPPageKindPageLayout = 6;
}
optional TP.PageHintArchive.PageKind page_kind = 1;
repeated TP.TargetHintArchive target_hints = 2;
optional TSP.Range footnote_auto_number_range = 3;
optional TSP.Range footnote_layout_range = 4;
optional TSP.Reference first_child_hint = 6;
optional TSP.Reference last_child_hint = 7;
repeated TP.AnchorPosArchive anchored_attachments_map = 8;
optional TP.TopicNumberHintsArchive topic_numbers = 9;
optional uint32 version_number = 10;
optional uint32 platform_id = 11;
}
message SectionHintArchive {
repeated TP.PageHintArchive page_hints = 1;
optional uint32 start_page_index = 2;
}
message TextboxHintArchive {
required TSP.Range range = 1;
required TSP.Size size = 2;
}
message TopicNumberEntryArchive {
required TSP.Reference list_style = 1;
repeated uint32 topic_number = 2;
repeated uint32 character_index = 3;
}
message TopicNumberHintsArchive {
optional uint32 charIndex = 1;
repeated TP.TopicNumberEntryArchive topic_numbers_map = 2;
optional uint32 valid_through_char_index = 3;
}
message LayoutStateArchive { // type 10131
optional uint32 section_index = 1;
optional uint32 section_page_index = 2;
optional uint32 document_page_index = 3;
optional uint32 last_page_count = 4;
repeated TP.SectionHintArchive section_hints = 5;
}
message CanvasSelectionArchive { // type 10132
required TSWP.SelectionType type = 1;
required TSP.Range range = 2;
required TSWP.StyleInsertionBehavior style_insertion_behavior = 3;
required TSWP.CaretAffinity caret_affinity = 4;
repeated TSP.Reference infos = 5;
repeated TSP.Reference excluded_infos = 6;
repeated TSP.Reference additional_infos = 7;
optional TSP.Reference container = 8;
}
message ViewStateArchive { // type 10133
optional float OBSOLETE_view_scale = 1;
optional TSP.Point visible_rect_origin = 2;
optional bool OBSOLETE_landscape = 3;
optional TSP.Reference selection = 4;
optional TSP.Reference selection_model = 5;
optional bool master_drawables_selectable = 6;
optional TSP.Size visible_rect_size = 7;
repeated TSCH.ChartUIState chart_ui_state = 8;
optional bool ruler_visible = 9 [default = true];
optional bool layout_borders_visible = 10 [default = false];
optional bool word_count_hud_visible = 11 [default = false];
optional bool shows_comments = 12 [default = true];
optional bool shows_page_navigator = 13 [default = false];
optional TP.ViewScaleMode view_scale_mode = 14 [default = ViewScaleMode_UserDefined];
optional float view_scale = 15 [default = 1.25];
optional TSP.Point window_frame_origin = 16;
optional TSP.Size window_frame_size = 17;
optional string selected_inspector_switch_segment_identifier = 18;
optional bool inspector_hidden = 19;
}
message UIStateArchive { // type 10147
optional TSP.Reference layout_state = 1;
optional TSP.Reference view_state = 2;
}
Application document (TSA)
message DocumentArchive { // TSA, type 600
required TSK.DocumentArchive super = 1;
repeated TSWP.TextPresetDisplayItemArchive text_preset_display_items = 2;
optional string creation_language = 3;
optional TSP.Reference calculation_engine = 4;
optional TSP.Reference view_state = 5;
optional TSP.Reference function_browser_state = 6;
optional TSP.Reference tables_custom_format_list = 7;
optional bool needs_movie_compatibility_upgrade = 8;
optional string template_identifier = 9;
}
message FunctionBrowserStateArchive { // TSA, type 601
repeated uint32 recent_functions = 1;
repeated uint32 back_functions = 2;
repeated uint32 forward_functions = 3;
optional uint32 current_function = 4;
}
message TestDocumentArchive {
required TSA.DocumentArchive super = 1;
optional string value = 2;
}
message PropagatePresetCommandArchive { // TSA, type 602
required TSK.CommandArchive super = 1;
}
Kit: document, undo history and number formats (TSK)
The undo history is saved with the document: CommandHistory keeps the
commands that can be undone, each one a command message such as
TP.InsertDrawablesCommandArchive. A reader that only shows the document
can ignore it.
message TreeNode { // type 205
optional string name = 1;
repeated TSP.Reference children = 2;
optional TSP.Reference object = 3;
}
message CommandHistory { // type 201
required uint32 undo_count = 1;
repeated TSP.Reference commands = 2;
repeated TSP.Reference marked_redo_commands = 3;
optional TSP.Reference pending_preflight_command = 4;
optional bool fixed_radar_13365177 = 10;
}
message DocumentArchive { // type 200
optional string locale_identifier = 4;
optional TSP.Reference annotation_author_storage = 7;
}
message DocumentSupportArchive { // type 211
optional TSP.Reference command_history = 1;
optional TSP.Reference command_selection_behavior_history = 2;
optional uint32 undo_count = 4;
optional uint32 redo_count = 5;
optional string undo_action_string = 6;
optional string redo_action_string = 7;
optional TSP.Reference web_state = 8;
}
message ViewStateArchive { // type 210
required TSP.Reference view_state_root = 1;
}
message CommandArchive {
optional TSP.Reference undoRedoState = 1;
optional TSP.Reference undoCollection = 2;
}
message CommandGroupArchive { // type 202
required TSK.CommandArchive super = 1;
repeated TSP.Reference commands = 2;
optional TSP.IndexSet process_results = 3;
}
message CommandContainerArchive { // type 203
repeated TSP.Reference commands = 1;
}
message ReplaceAllChildCommandArchive {
required TSK.CommandArchive super = 1;
}
message ReplaceAllCommandArchive { // type 204
required TSK.CommandArchive super = 1;
repeated TSP.Reference commands = 2;
required string find_string = 3;
required string replace_string = 4;
required uint32 options = 5;
}
message ShuffleMappingArchive {
message Entry {
required uint32 from = 1;
required uint32 to = 2;
}
required uint32 start_index = 1;
required uint32 end_index = 2;
repeated TSK.ShuffleMappingArchive.Entry entries = 3;
optional bool is_vertical = 4 [default = true];
optional bool is_move_operation = 5 [default = false];
optional uint32 first_moved_index = 6 [default = 0];
optional uint32 destination_index_for_move = 7 [default = 0];
optional uint32 number_of_indices_moved = 8 [default = 0];
}
message ProgressiveCommandGroupArchive { // type 206
required TSK.CommandGroupArchive super = 1;
}
message CommandSelectionBehaviorHistoryArchive { // type 208
message Entry {
required TSP.Reference command = 1;
required TSP.Reference command_selection_behavior = 2;
}
repeated TSK.CommandSelectionBehaviorHistoryArchive.Entry entries = 1;
}
message UndoRedoStateCommandSelectionBehaviorArchive { // type 209
optional TSP.Reference undo_redo_state = 2;
}
message AnnotationAuthorArchive { // type 212
optional string name = 1;
optional TSP.Color color = 2;
}
message DeprecatedChangeAuthorArchive { // type 2061
optional string name = 1;
optional TSP.Color change_color = 2;
}
message AnnotationAuthorStorageArchive { // type 213
repeated TSP.Reference annotation_author = 1;
}
message AddAnnotationAuthorCommandArchive { // type 214
required TSK.CommandArchive super = 1;
optional TSP.Reference document_root = 2;
optional TSP.Reference annotation_author = 3;
}
message SetAnnotationAuthorColorCommandArchive { // type 215
required TSK.CommandArchive super = 1;
optional TSP.Reference annotation_author = 2;
optional TSP.Color color = 3;
}
Number formats, used by table cells and number fields:
message FormatStructArchive {
required uint32 format_type = 1;
optional uint32 decimal_places = 2;
optional string currency_code = 3;
optional uint32 negative_style = 4;
optional bool show_thousands_separator = 5;
optional bool use_accounting_style = 6;
optional uint32 duration_style = 7;
optional uint32 base = 8;
optional uint32 base_places = 9;
optional bool base_use_minus_sign = 10;
optional uint32 fraction_accuracy = 11;
optional bool suppress_date_format = 12;
optional bool suppress_time_format = 13;
optional string date_time_format = 14;
optional uint32 duration_unit_largest = 15;
optional uint32 duration_unit_smallest = 16;
optional uint32 custom_id = 17;
optional string custom_format_string = 18;
optional double scale_factor = 19;
optional bool requires_fraction_replacement = 20;
optional double control_minimum = 21;
optional double control_maximum = 22;
optional double control_increment = 23;
optional uint32 control_format_type = 24;
optional uint32 slider_orientation = 25;
optional uint32 slider_position = 26;
optional uint32 decimal_width = 27;
optional uint32 min_integer_width = 28;
optional uint32 num_nonspace_integer_digits = 29;
optional uint32 num_nonspace_decimal_digits = 30;
optional uint32 index_from_right_last_integer = 31;
repeated string interstitial_strings = 32;
optional TSP.IndexSet inters_str_insertion_indexes = 33;
optional uint32 num_hash_decimal_digits = 34;
optional uint32 total_num_decimal_digits = 35;
optional bool is_complex = 36;
optional bool contains_integer_token = 37;
optional uint32 multiple_choice_list_initial_value = 38;
optional uint32 multiple_choice_list_id = 39;
optional bool use_automatic_duration_units = 40;
extensions 10000 to 19999;
}
message CustomFormatArchive {
message Condition {
required uint32 condition_type = 1;
optional float condition_value = 2;
required TSK.FormatStructArchive condition_format = 3;
optional double condition_value_dbl = 4;
}
required string name = 1;
required uint32 format_type = 2;
required TSK.FormatStructArchive default_format = 3;
repeated TSK.CustomFormatArchive.Condition conditions = 4;
}
The numeric codes of format_type, negative_style,
duration_style and condition_type are not named in the dump
and are not known from this source.
Styles, style sheets and themes (TSS)
Every style message (paragraph, character, list, shape and others) starts with a
TSS.StyleArchive as its super. A style’s
parent is the style it inherits from; a variation is an unnamed
style made when the user changes a named one locally. A theme’s presets live in
extension fields: TSD.ThemePresetsArchive as field 100 and
TSWP.ThemePresetsArchive as field 110 of
TSS.ThemeArchive.
message StyleArchive { // type 400
optional string name = 1;
optional string style_identifier = 2;
optional TSP.Reference parent = 3;
optional bool is_variation = 4 [default = false];
optional TSP.Reference stylesheet = 5;
}
message StylesheetArchive { // type 401
message IdentifiedStyleEntry {
required string identifier = 1;
required TSP.Reference style = 2;
}
message StyleChildrenEntry {
required TSP.Reference parent = 1;
repeated TSP.Reference children = 2;
}
repeated TSP.Reference styles = 1;
repeated TSS.StylesheetArchive.IdentifiedStyleEntry identifier_to_style_map = 2;
optional TSP.Reference parent = 3;
optional bool is_locked = 4 [default = true];
repeated TSS.StylesheetArchive.StyleChildrenEntry parent_to_children_style_map = 5;
optional bool can_cull_styles = 6 [default = false];
}
message ThemeArchive { // type 402
optional TSP.Reference stylesheet = 1;
optional string theme_identifier = 3;
repeated TSP.Color color_presets = 10;
extensions 100 to 536870911;
}
message ApplyThemeCommandArchive { // type 410
required TSK.CommandArchive super = 1;
repeated TSP.Reference commands = 2;
optional TSP.Reference old_theme = 3;
optional TSP.Reference new_theme = 4;
}
message ApplyThemeChildCommandArchive { // type 411
required TSK.CommandArchive super = 1;
optional TSP.Reference parent = 2;
}
message ReapUnusedStyleCommandArchive {
message IdentifiedStyleEntry {
required string identifier = 1;
required TSP.Reference style = 2;
}
required TSK.CommandArchive super = 1;
optional TSP.Reference stylesheet = 2;
repeated TSP.Reference styles = 3;
repeated TSS.ReapUnusedStyleCommandArchive.IdentifiedStyleEntry identified_styles = 4;
}
message StyleUpdatePropertyMapCommandArchive { // type 412
required TSK.CommandArchive super = 1;
required TSP.Reference current_style = 2;
required TSP.Reference style_with_old_property_map = 3;
required TSP.Reference style_with_new_property_map = 4;
optional bool notify_for_style_clients = 6 [default = true];
}
message ThemeReplacePresetCommandArchive { // type 413
required TSK.CommandArchive super = 1;
required TSP.Reference theme = 2;
required TSP.Reference preset = 3;
required TSP.Reference oldPreset = 4;
required uint32 index = 5;
}
message ThemeAddStylePresetCommandArchive { // type 414
required TSK.CommandArchive super = 1;
required TSP.Reference theme = 2;
required TSP.Reference preset = 3;
required string preset_kind = 4;
optional string identifier = 5;
optional bool add_preset_to_stylesheet = 6;
}
message ThemeRemoveStylePresetCommandArchive { // type 415
required TSK.CommandArchive super = 1;
required TSP.Reference theme = 2;
required TSP.Reference preset = 3;
required uint32 preset_index = 4;
required string preset_kind = 5;
optional string identifier = 6;
}
message ThemeReplaceColorPresetCommandArchive { // type 416
required TSK.CommandArchive super = 1;
required TSP.Reference theme = 2;
required TSP.Color color = 3;
required TSP.Color old_color = 4;
required uint32 index = 5;
}
message ThemeMovePresetCommandArchive { // type 417
required TSK.CommandArchive super = 1;
required TSP.Reference theme = 2;
required TSP.Reference preset = 3;
required uint32 new_index = 4;
required uint32 old_index = 5;
}
message ThemeReplaceStylePresetCommandArchive { // type 418
required TSK.CommandArchive super = 1;
required TSP.Reference preset = 3;
required TSP.Reference old_preset = 4;
}
Not covered here
- The Pages undo commands (
TPCommandArchives.proto, types 10101 and up) and the command messages of the other frameworks are listed by type number on message type numbers, but their fields are not given here. - Tables (
TST), the calculation engine (TSCE) and charts (TSCH), which a Pages document uses when it contains a table or chart, are not yet described field by field. - Messages and fields added after Pages 5.0.