Documentation
¶
Overview ¶
Package manifest 负责读取声明式 manifest 并构建 OFD 文档模型。
Index ¶
- Variables
- type Action
- type ActionArea
- type ActionRegion
- type Annotation
- type AnnotationPage
- type AnnotationParameter
- type Attachment
- type AxialShading
- type Bookmark
- type Box
- type BuildOptions
- type CGTransform
- type CaptionStyle
- type Clip
- type ClipArea
- type ClipPath
- type ClipText
- type Color
- type ColorSpace
- type ColorStop
- type Composite
- type CustomData
- type CustomTag
- type Document
- type DrawParam
- type Extension
- type ExtensionProperty
- type FieldDoc
- type Font
- type GotoAAction
- type GotoAction
- type Gouraud
- type GouraudPoint
- type Image
- type ImageBorder
- type Item
- type LaGouraud
- type LaGouraudPoint
- type Layer
- type Manifest
- type Media
- type MovieAction
- type Outline
- type Page
- type PageArea
- type PageImage
- type PageResource
- type PageSize
- type Pattern
- type Permissions
- type Point
- type Preferences
- type PrintSettings
- type PublicResource
- type RadialShading
- type RegionCommand
- type ResourceFile
- type Resources
- type Signature
- type SignatureReference
- type SignatureStamp
- type SoundAction
- type TableCell
- type TableRow
- type TableStyle
- type Template
- type TemplateRef
- type TextCode
- type TypeDoc
- type URIAction
- type ValidPeriod
- type Version
- type VersionFile
Constants ¶
This section is empty.
Variables ¶
var SchemaDocs = []TypeDoc{ {Name: "Manifest", Path: "", Doc: "是 ofd-creator 支持的声明式输入文件。", Fields: []FieldDoc{ {Name: "version", Type: "int", Doc: "指定 manifest 格式版本。", Optional: true}, {Name: "document", Type: "Document", Doc: "定义文档主体及其元数据。", Optional: false}, {Name: "resources", Type: "Resources", Doc: "汇总文档级资源。", Optional: false}, {Name: "templates", Type: "[]Template", Doc: "定义可供页面引用的模板页。", Optional: true}, {Name: "pages", Type: "[]Page", Doc: "定义文档页面。", Optional: true}, }}, {Name: "Document", Path: "document", Doc: "描述 OFD 文档及其元数据、资源和页面内容。", Fields: []FieldDoc{ {Name: "id", Type: "string", Doc: "标识文档。", Optional: true}, {Name: "title", Type: "string", Doc: "记录文档标题。", Optional: true}, {Name: "author", Type: "string", Doc: "记录文档作者。", Optional: true}, {Name: "subject", Type: "string", Doc: "记录文档主题。", Optional: true}, {Name: "abstract", Type: "string", Doc: "记录文档摘要。", Optional: true}, {Name: "creator", Type: "string", Doc: "记录创建文档的应用名称。", Optional: true}, {Name: "creator_version", Type: "string", Doc: "记录创建应用的版本。", Optional: true}, {Name: "page_size", Type: "PageSize", Doc: "定义默认页面尺寸。", Optional: false}, {Name: "actions", Type: "[]Action", Doc: "定义文档级动作。", Optional: true}, {Name: "bookmarks", Type: "[]Bookmark", Doc: "定义文档书签。", Optional: true}, {Name: "attachments", Type: "[]Attachment", Doc: "定义文档附件。", Optional: true}, {Name: "extensions", Type: "[]Extension", Doc: "定义文档扩展信息。", Optional: true}, {Name: "versions", Type: "[]Version", Doc: "定义文档版本记录。", Optional: true}, {Name: "annotations", Type: "[]AnnotationPage", Doc: "定义按页面组织的批注。", Optional: true}, {Name: "doc_usage", Type: "string", Doc: "说明文档用途。", Optional: true}, {Name: "keywords", Type: "[]string", Doc: "记录文档关键词。", Optional: true}, {Name: "custom_data", Type: "[]CustomData", Doc: "定义文档自定义键值数据。", Optional: true}, {Name: "cover", Type: "string", Doc: "指定封面文件路径。", Optional: true}, {Name: "cover_base64", Type: "string", Doc: "提供 Base64 编码的封面数据。", Optional: true}, {Name: "cover_name", Type: "string", Doc: "指定封面在文档中的名称。", Optional: true}, {Name: "doc_type", Type: "string", Doc: "指定 OFD.xml 根节点的 DocType 取值,决定文档遵循的 profile。\n留空或 \"OFD\" 为 GB/T 33190—2016 的基础 profile;\"OFD-A\" 是\nGB/T 42133—2022《信息技术 OFD档案应用指南》规定的档案长期保存 profile,\n\"OFD-H\" 是 GB/T 48666-2026《电子病历版式文档技术要求》(征求意见稿)\n规定的电子病历 profile。取值区分大小写,未知取值在生成阶段报错。", Optional: true}, {Name: "creation_date", Type: "string", Doc: "记录文档创建时间。", Optional: true}, {Name: "mod_date", Type: "string", Doc: "记录文档最后修改时间。", Optional: true}, {Name: "area", Type: "*PageArea", Doc: "定义文档页面区域。", Optional: true}, {Name: "default_cs", Type: "uint64", Doc: "指定文档默认颜色空间编号。", Optional: true}, {Name: "preferences", Type: "*Preferences", Doc: "定义文档查看偏好。", Optional: true}, {Name: "permissions", Type: "*Permissions", Doc: "定义文档访问和操作权限。", Optional: true}, {Name: "outlines", Type: "[]Outline", Doc: "定义文档大纲。", Optional: true}, {Name: "signatures", Type: "[]Signature", Doc: "定义文档数字签名。", Optional: true}, }}, {Name: "Resources", Path: "resources", Doc: "汇总文档级资源。", Fields: []FieldDoc{ {Name: "fonts", Type: "[]Font", Doc: "汇总字体资源。", Optional: true}, {Name: "images", Type: "[]Image", Doc: "汇总图像资源。", Optional: true}, {Name: "media", Type: "[]Media", Doc: "汇总媒体资源。", Optional: true}, {Name: "color_spaces", Type: "[]ColorSpace", Doc: "汇总颜色空间资源。", Optional: true}, {Name: "draw_params", Type: "[]DrawParam", Doc: "汇总图形绘制参数。", Optional: true}, {Name: "composites", Type: "[]Composite", Doc: "汇总复合图形单元资源。", Optional: true}, {Name: "public", Type: "[]PublicResource", Doc: "汇总公共资源。", Optional: true}, {Name: "custom_tags", Type: "[]CustomTag", Doc: "汇总自定义标签资源。", Optional: true}, }}, {Name: "Template", Path: "templates[]", Doc: "描述可供页面引用的模板页。", Fields: []FieldDoc{ {Name: "id", Type: "uint64", Doc: "标识模板页。", Optional: true}, {Name: "name", Type: "string", Doc: "指定模板页名称。", Optional: true}, {Name: "z_order", Type: "string", Doc: "指定模板页的层叠顺序。", Optional: true}, {Name: "layers", Type: "[]Layer", Doc: "定义模板页图层。", Optional: true}, {Name: "items", Type: "[]Item", Doc: "定义模板页图元。", Optional: true}, {Name: "area", Type: "*PageArea", Doc: "定义模板页区域。", Optional: true}, }}, {Name: "Page", Path: "pages[]", Doc: "描述文档页面及其图层、图元和页面资源。", Fields: []FieldDoc{ {Name: "templates", Type: "[]TemplateRef", Doc: "指定页面引用的模板页。", Optional: true}, {Name: "layers", Type: "[]Layer", Doc: "定义页面图层。", Optional: true}, {Name: "items", Type: "[]Item", Doc: "定义页面图元。", Optional: true}, {Name: "area", Type: "*PageArea", Doc: "定义页面区域。", Optional: true}, {Name: "layer_type", Type: "string", Doc: "指定页面图层类型。", Optional: true}, {Name: "actions", Type: "[]Action", Doc: "定义页面级动作。", Optional: true}, {Name: "resources", Type: "[]PageResource", Doc: "定义页面级资源。", Optional: true}, }}, {Name: "PageSize", Path: "document.page_size", Doc: "描述文档页面尺寸。", Fields: []FieldDoc{ {Name: "name", Type: "string", Doc: "指定预定义页面尺寸名称。", Optional: true}, {Name: "width", Type: "float64", Doc: "指定页面宽度。", Optional: true}, {Name: "height", Type: "float64", Doc: "指定页面高度。", Optional: true}, }}, {Name: "Action", Path: "document.actions[]", Doc: "描述文档、页面或图元触发的动作。", Fields: []FieldDoc{ {Name: "event", Type: "string", Doc: "指定触发动作的事件。", Optional: true}, {Name: "region", Type: "*ActionRegion", Doc: "定义动作触发区域。", Optional: true}, {Name: "uri", Type: "*URIAction", Doc: "定义打开或跳转到 URI 的动作。", Optional: true}, {Name: "goto", Type: "*GotoAction", Doc: "定义跳转到页面或位置的动作。", Optional: true}, {Name: "goto_a", Type: "*GotoAAction", Doc: "定义跳转到附件的动作。", Optional: true}, {Name: "sound", Type: "*SoundAction", Doc: "定义播放声音资源的动作。", Optional: true}, {Name: "movie", Type: "*MovieAction", Doc: "定义播放媒体资源的动作。", Optional: true}, }}, {Name: "Bookmark", Path: "document.bookmarks[]", Doc: "描述文档书签及其跳转目标。", Fields: []FieldDoc{ {Name: "name", Type: "string", Doc: "指定书签名称。", Optional: true}, {Name: "goto", Type: "GotoAction", Doc: "指定书签跳转目标。", Optional: true}, }}, {Name: "Attachment", Path: "document.attachments[]", Doc: "描述文档附件。", Fields: []FieldDoc{ {Name: "id", Type: "string", Doc: "标识附件。", Optional: true}, {Name: "name", Type: "string", Doc: "指定附件名称。", Optional: true}, {Name: "format", Type: "string", Doc: "指定附件格式。", Optional: true}, {Name: "usage", Type: "string", Doc: "说明附件用途。", Optional: true}, {Name: "file", Type: "string", Doc: "指定附件文件路径。", Optional: true}, {Name: "data_base64", Type: "string", Doc: "提供 Base64 编码的附件数据。", Optional: true}, {Name: "file_name", Type: "string", Doc: "指定附件在文档中的文件名。", Optional: true}, {Name: "creation_date", Type: "string", Doc: "记录附件创建时间。", Optional: true}, {Name: "mod_date", Type: "string", Doc: "记录附件最后修改时间。", Optional: true}, {Name: "visible", Type: "*bool", Doc: "指示附件是否可见。", Optional: true}, }}, {Name: "Extension", Path: "document.extensions[]", Doc: "描述文档扩展信息。", Fields: []FieldDoc{ {Name: "app_name", Type: "string", Doc: "指定扩展信息来源应用名称。", Optional: true}, {Name: "company", Type: "string", Doc: "指定扩展信息来源公司。", Optional: true}, {Name: "app_version", Type: "string", Doc: "指定来源应用版本。", Optional: true}, {Name: "date", Type: "string", Doc: "记录扩展信息生成时间。", Optional: true}, {Name: "ref_id", Type: "uint64", Doc: "指定扩展信息引用标识。", Optional: true}, {Name: "data", Type: "string", Doc: "指定扩展数据。", Optional: true}, {Name: "data_xml", Type: "string", Doc: "指定扩展 XML 数据。", Optional: true}, {Name: "data_file", Type: "string", Doc: "指定扩展数据文件路径。", Optional: true}, {Name: "data_file_base64", Type: "string", Doc: "提供 Base64 编码的扩展文件数据。", Optional: true}, {Name: "data_name", Type: "string", Doc: "指定扩展数据文件名称。", Optional: true}, {Name: "properties", Type: "[]ExtensionProperty", Doc: "定义扩展属性。", Optional: true}, }}, {Name: "Version", Path: "document.versions[]", Doc: "描述文档的一个版本。", Fields: []FieldDoc{ {Name: "id", Type: "string", Doc: "标识文档版本。", Optional: true}, {Name: "index", Type: "int", Doc: "指定版本序号。", Optional: true}, {Name: "current", Type: "bool", Doc: "指示是否为当前版本。", Optional: true}, {Name: "version", Type: "string", Doc: "指定版本号。", Optional: false}, {Name: "name", Type: "string", Doc: "指定版本名称。", Optional: true}, {Name: "creation_date", Type: "string", Doc: "记录版本创建时间。", Optional: true}, {Name: "doc_root", Type: "string", Doc: "指定版本文档根文件路径。", Optional: true}, {Name: "doc_root_base64", Type: "string", Doc: "提供 Base64 编码的版本文档根数据。", Optional: true}, {Name: "doc_root_name", Type: "string", Doc: "指定版本文档根文件名称。", Optional: true}, {Name: "files", Type: "[]VersionFile", Doc: "定义版本包含的文件。", Optional: true}, }}, {Name: "AnnotationPage", Path: "document.annotations[]", Doc: "描述某一页面上的批注集合。", Fields: []FieldDoc{ {Name: "page", Type: "int", Doc: "指定批注所属页码。", Optional: true}, {Name: "items", Type: "[]Annotation", Doc: "定义该页面上的批注。", Optional: true}, }}, {Name: "CustomData", Path: "document.custom_data[]", Doc: "描述文档自定义键值数据。", Fields: []FieldDoc{ {Name: "name", Type: "string", Doc: "指定自定义数据名称。", Optional: true}, {Name: "value", Type: "string", Doc: "指定自定义数据值。", Optional: true}, }}, {Name: "PageArea", Path: "document.area", Doc: "描述页面的物理、应用、内容和出血区域。", Fields: []FieldDoc{ {Name: "physical_box", Type: "*Box", Doc: "定义页面物理区域。", Optional: true}, {Name: "application_box", Type: "*Box", Doc: "定义页面应用区域。", Optional: true}, {Name: "content_box", Type: "*Box", Doc: "定义页面内容区域。", Optional: true}, {Name: "bleed_box", Type: "*Box", Doc: "定义页面出血区域。", Optional: true}, }}, {Name: "Preferences", Path: "document.preferences", Doc: "描述文档查看偏好设置。", Fields: []FieldDoc{ {Name: "page_mode", Type: "string", Doc: "指定页面显示模式。", Optional: true}, {Name: "page_layout", Type: "string", Doc: "指定页面布局方式。", Optional: true}, {Name: "tab_display", Type: "string", Doc: "指定文档标签页显示方式。", Optional: true}, {Name: "hide_toolbar", Type: "*bool", Doc: "指示是否隐藏工具栏。", Optional: true}, {Name: "hide_menubar", Type: "*bool", Doc: "指示是否隐藏菜单栏。", Optional: true}, {Name: "hide_window_ui", Type: "*bool", Doc: "指示是否隐藏窗口界面元素。", Optional: true}, {Name: "zoom_mode", Type: "string", Doc: "指定缩放模式。", Optional: true}, {Name: "zoom", Type: "*float64", Doc: "指定页面缩放比例。", Optional: true}, }}, {Name: "Permissions", Path: "document.permissions", Doc: "描述文档的访问和操作权限。", Fields: []FieldDoc{ {Name: "edit", Type: "*bool", Doc: "指示是否允许编辑文档。", Optional: true}, {Name: "annot", Type: "*bool", Doc: "指示是否允许添加或修改批注。", Optional: true}, {Name: "export", Type: "*bool", Doc: "指示是否允许导出文档。", Optional: true}, {Name: "signature", Type: "*bool", Doc: "指示是否允许签名。", Optional: true}, {Name: "watermark", Type: "*bool", Doc: "指示是否允许修改水印。", Optional: true}, {Name: "print_screen", Type: "*bool", Doc: "指示是否允许屏幕截图。", Optional: true}, {Name: "print", Type: "*PrintSettings", Doc: "定义打印权限和设置。", Optional: true}, {Name: "valid_period", Type: "*ValidPeriod", Doc: "定义权限的有效时间范围。", Optional: true}, }}, {Name: "Outline", Path: "document.outlines[]", Doc: "描述文档大纲节点及其子节点。", Fields: []FieldDoc{ {Name: "title", Type: "string", Doc: "指定大纲节点标题。", Optional: true}, {Name: "count", Type: "*int", Doc: "指定大纲节点包含的条目数。", Optional: true}, {Name: "expanded", Type: "*bool", Doc: "指示大纲节点是否展开。", Optional: true}, {Name: "actions", Type: "[]Action", Doc: "定义大纲节点动作。", Optional: true}, {Name: "children", Type: "[]Outline", Doc: "定义大纲子节点。", Optional: true}, }}, {Name: "Signature", Path: "document.signatures[]", Doc: "描述文档数字签名。", Fields: []FieldDoc{ {Name: "id", Type: "string", Doc: "标识数字签名。", Optional: true}, {Name: "type", Type: "string", Doc: "指定签名类型。", Optional: true}, {Name: "provider_name", Type: "string", Doc: "指定签名提供方名称。", Optional: true}, {Name: "provider_version", Type: "string", Doc: "指定签名提供方版本。", Optional: true}, {Name: "company", Type: "string", Doc: "指定签名提供方公司。", Optional: true}, {Name: "method", Type: "string", Doc: "指定签名方法。", Optional: true}, {Name: "date", Type: "string", Doc: "记录签名时间。", Optional: true}, {Name: "check_method", Type: "string", Doc: "指定签名校验方法。", Optional: true}, {Name: "references", Type: "[]SignatureReference", Doc: "定义签名引用及其校验值。", Optional: true}, {Name: "stamp_annots", Type: "[]SignatureStamp", Doc: "定义签名盖章区域。", Optional: true}, {Name: "seal_file", Type: "string", Doc: "指定印章文件路径。", Optional: true}, {Name: "seal_file_base64", Type: "string", Doc: "提供 Base64 编码的印章数据。", Optional: true}, {Name: "seal_name", Type: "string", Doc: "指定印章文件名称。", Optional: true}, {Name: "signed_value", Type: "string", Doc: "提供 Base64 编码的签名值。", Optional: true}, {Name: "signed_value_name", Type: "string", Doc: "指定签名值文件名称。", Optional: true}, }}, {Name: "Font", Path: "resources.fonts[]", Doc: "描述文档使用的字体资源。", Fields: []FieldDoc{ {Name: "name", Type: "string", Doc: "指定字体资源名称。", Optional: true}, {Name: "family_name", Type: "string", Doc: "指定字体族名称。", Optional: true}, {Name: "charset", Type: "string", Doc: "指定字体字符集。", Optional: true}, {Name: "format", Type: "string", Doc: "指定字体文件格式。", Optional: true}, {Name: "file", Type: "string", Doc: "指定字体文件路径。", Optional: true}, {Name: "data_base64", Type: "string", Doc: "提供 Base64 编码的字体数据。", Optional: true}, {Name: "italic", Type: "bool", Doc: "指示字体是否为斜体。", Optional: true}, {Name: "bold", Type: "bool", Doc: "指示字体是否为粗体。", Optional: true}, {Name: "serif", Type: "bool", Doc: "指示字体是否为衬线字体。", Optional: true}, {Name: "fixed_width", Type: "bool", Doc: "指示字体是否为等宽字体。", Optional: true}, }}, {Name: "Image", Path: "resources.images[]", Doc: "描述文档中的图像资源。", Fields: []FieldDoc{ {Name: "id", Type: "uint64", Doc: "标识图像资源。", Optional: true}, {Name: "format", Type: "string", Doc: "指定图像格式。", Optional: true}, {Name: "name", Type: "string", Doc: "指定图像名称。", Optional: true}, {Name: "file", Type: "string", Doc: "指定图像文件路径。", Optional: true}, {Name: "data_base64", Type: "string", Doc: "提供 Base64 编码的图像数据。", Optional: true}, }}, {Name: "Media", Path: "resources.media[]", Doc: "描述文档中的媒体资源。", Fields: []FieldDoc{ {Name: "id", Type: "uint64", Doc: "标识媒体资源。", Optional: true}, {Name: "type", Type: "string", Doc: "指定媒体类型。", Optional: true}, {Name: "format", Type: "string", Doc: "指定媒体格式。", Optional: true}, {Name: "name", Type: "string", Doc: "指定媒体名称。", Optional: true}, {Name: "file", Type: "string", Doc: "指定媒体文件路径。", Optional: true}, {Name: "data_base64", Type: "string", Doc: "提供 Base64 编码的媒体数据。", Optional: true}, }}, {Name: "ColorSpace", Path: "resources.color_spaces[]", Doc: "描述文档使用的颜色空间资源。", Fields: []FieldDoc{ {Name: "id", Type: "uint64", Doc: "标识颜色空间资源。", Optional: true}, {Name: "type", Type: "string", Doc: "指定颜色空间类型。", Optional: true}, {Name: "bits_per_component", Type: "int", Doc: "指定每个颜色分量的位数。", Optional: true}, {Name: "palette", Type: "[]string", Doc: "定义颜色索引到颜色分量的映射。", Optional: true}, {Name: "profile_file", Type: "string", Doc: "指定颜色配置文件路径。", Optional: true}, {Name: "profile_base64", Type: "string", Doc: "提供 Base64 编码的颜色配置数据。", Optional: true}, {Name: "profile_name", Type: "string", Doc: "指定颜色配置文件名称。", Optional: true}, }}, {Name: "DrawParam", Path: "resources.draw_params[]", Doc: "描述图形绘制参数。", Fields: []FieldDoc{ {Name: "name", Type: "string", Doc: "指定绘制参数名称。", Optional: true}, {Name: "relative", Type: "string", Doc: "指定参数相对的坐标或对象。", Optional: true}, {Name: "line_width", Type: "float64", Doc: "指定线宽。", Optional: true}, {Name: "join", Type: "string", Doc: "指定线段连接样式。", Optional: true}, {Name: "cap", Type: "string", Doc: "指定线段端点样式。", Optional: true}, {Name: "dash_offset", Type: "float64", Doc: "指定虚线起始偏移量。", Optional: true}, {Name: "dash_pattern", Type: "[]float64", Doc: "指定虚线长度模式。", Optional: true}, {Name: "miter_limit", Type: "float64", Doc: "指定斜接长度限制。", Optional: true}, {Name: "fill_color", Type: "*Color", Doc: "指定填充颜色。", Optional: true}, {Name: "stroke_color", Type: "*Color", Doc: "指定描边颜色。", Optional: true}, }}, {Name: "Composite", Path: "resources.composites[]", Doc: "描述复合图形单元资源。", Fields: []FieldDoc{ {Name: "id", Type: "uint64", Doc: "标识复合图形单元。", Optional: true}, {Name: "width", Type: "float64", Doc: "指定复合图形宽度。", Optional: true}, {Name: "height", Type: "float64", Doc: "指定复合图形高度。", Optional: true}, {Name: "thumbnail", Type: "uint64", Doc: "指定缩略图资源编号。", Optional: true}, {Name: "substitution", Type: "uint64", Doc: "指定替代图形资源编号。", Optional: true}, {Name: "items", Type: "[]Item", Doc: "定义复合图形中的图元。", Optional: true}, }}, {Name: "PublicResource", Path: "resources.public[]", Doc: "描述文档中的公共资源。", Fields: []FieldDoc{ {Name: "name", Type: "string", Doc: "指定公共资源名称。", Optional: true}, {Name: "file", Type: "string", Doc: "指定公共资源文件路径。", Optional: true}, {Name: "data_base64", Type: "string", Doc: "提供 Base64 编码的公共资源数据。", Optional: true}, {Name: "files", Type: "[]ResourceFile", Doc: "定义公共资源包中的文件。", Optional: true}, }}, {Name: "CustomTag", Path: "resources.custom_tags[]", Doc: "描述文档自定义标签及其架构和数据。", Fields: []FieldDoc{ {Name: "name_space", Type: "string", Doc: "指定自定义标签命名空间。", Optional: true}, {Name: "schema", Type: "string", Doc: "指定架构文件路径。", Optional: true}, {Name: "schema_base64", Type: "string", Doc: "提供 Base64 编码的架构数据。", Optional: true}, {Name: "schema_name", Type: "string", Doc: "指定架构在文档中的名称。", Optional: true}, {Name: "data", Type: "string", Doc: "指定自定义数据文件路径或文本数据。", Optional: true}, {Name: "data_base64", Type: "string", Doc: "提供 Base64 编码的自定义数据。", Optional: true}, {Name: "data_name", Type: "string", Doc: "指定自定义数据在文档中的名称。", Optional: true}, }}, {Name: "Layer", Path: "templates[].layers[]", Doc: "描述页面或模板中的图层。", Fields: []FieldDoc{ {Name: "type", Type: "string", Doc: "指定图层类型。", Optional: true}, {Name: "draw_param", Type: "string", Doc: "指定图层使用的绘制参数名称。", Optional: true}, {Name: "items", Type: "[]Item", Doc: "定义图层中的图元。", Optional: true}, }}, {Name: "Item", Path: "templates[].items[]", Doc: "描述页面、模板或复合图形中的图元。", Fields: []FieldDoc{ {Name: "type", Type: "string", Doc: "指定图元类型。", Optional: true}, {Name: "x", Type: "float64", Doc: "指定图元左上角横坐标。", Optional: true}, {Name: "y", Type: "float64", Doc: "指定图元左上角纵坐标。", Optional: true}, {Name: "width", Type: "float64", Doc: "指定图元宽度。", Optional: true}, {Name: "height", Type: "float64", Doc: "指定图元高度。", Optional: true}, {Name: "value", Type: "string", Doc: "指定图元文本或其他值。", Optional: true}, {Name: "font", Type: "string", Doc: "指定文本图元使用的字体名称。", Optional: true}, {Name: "size", Type: "float64", Doc: "指定文本字号。", Optional: true}, {Name: "data", Type: "string", Doc: "指定图元数据或文件路径。", Optional: true}, {Name: "data_base64", Type: "string", Doc: "提供 Base64 编码的图元数据。", Optional: true}, {Name: "format", Type: "string", Doc: "指定图元数据格式。", Optional: true}, {Name: "name", Type: "string", Doc: "指定图元名称。", Optional: true}, {Name: "visible", Type: "*bool", Doc: "指示图元是否可见。", Optional: true}, {Name: "resource_id", Type: "uint64", Doc: "指定图元引用的资源编号。", Optional: true}, {Name: "stroke", Type: "bool", Doc: "指示是否绘制轮廓线。", Optional: true}, {Name: "fill", Type: "*bool", Doc: "指示是否填充图元。", Optional: true}, {Name: "stroke_set", Type: "*bool", Doc: "指示是否显式设置描边属性。", Optional: true}, {Name: "rule", Type: "string", Doc: "指定填充规则。", Optional: true}, {Name: "line_width", Type: "float64", Doc: "指定描边线宽。", Optional: true}, {Name: "cap", Type: "string", Doc: "指定描边端点样式。", Optional: true}, {Name: "join", Type: "string", Doc: "指定描边连接样式。", Optional: true}, {Name: "miter_limit", Type: "float64", Doc: "指定斜接长度限制。", Optional: true}, {Name: "dash_offset", Type: "float64", Doc: "指定虚线起始偏移量。", Optional: true}, {Name: "dash_pattern", Type: "[]float64", Doc: "指定虚线长度模式。", Optional: true}, {Name: "alpha", Type: "*uint8", Doc: "指定图元透明度。", Optional: true}, {Name: "draw_param", Type: "string", Doc: "指定图元使用的绘制参数名称。", Optional: true}, {Name: "ctm", Type: "[]float64", Doc: "指定图元的坐标变换矩阵。", Optional: true}, {Name: "fill_color", Type: "*Color", Doc: "指定填充颜色。", Optional: true}, {Name: "stroke_color", Type: "*Color", Doc: "指定描边颜色。", Optional: true}, {Name: "text_codes", Type: "[]TextCode", Doc: "定义文本代码及其定位信息。", Optional: true}, {Name: "cg_transforms", Type: "[]CGTransform", Doc: "定义文本代码到字形的映射。", Optional: true}, {Name: "actions", Type: "[]Action", Doc: "定义图元触发的动作。", Optional: true}, {Name: "items", Type: "[]Item", Doc: "定义复合或页面块图元的子图元。", Optional: true}, {Name: "h_scale", Type: "float64", Doc: "指定文本水平方向缩放比例。", Optional: true}, {Name: "read_direction", Type: "int", Doc: "指定文本阅读方向。", Optional: true}, {Name: "char_direction", Type: "int", Doc: "指定字符排列方向。", Optional: true}, {Name: "weight", Type: "int", Doc: "指定文本字重。", Optional: true}, {Name: "italic", Type: "bool", Doc: "指示文本是否为斜体。", Optional: true}, {Name: "clips", Type: "[]Clip", Doc: "定义图元裁剪区域。", Optional: true}, {Name: "substitution", Type: "uint64", Doc: "指定图像替代资源编号。", Optional: true}, {Name: "image_mask", Type: "uint64", Doc: "指定图像掩码资源编号。", Optional: true}, {Name: "border", Type: "*ImageBorder", Doc: "定义图像边框样式。", Optional: true}, {Name: "rows", Type: "[]TableRow", Doc: "定义表格行(仅当 type 为 \"table\" 时有效)。", Optional: true}, {Name: "column_widths", Type: "[]float64", Doc: "定义各列宽度(仅当 type 为 \"table\" 时有效)。", Optional: true}, {Name: "header_rows", Type: "int", Doc: "定义表头行数(仅当 type 为 \"table\" 时有效)。", Optional: true}, {Name: "style", Type: "*TableStyle", Doc: "定义表格样式(仅当 type 为 \"table\" 时有效)。", Optional: true}, {Name: "caption", Type: "string", Doc: "定义表题文字(仅当 type 为 \"table\" 时有效)。", Optional: true}, {Name: "caption_style", Type: "*CaptionStyle", Doc: "定义表题样式(仅当 type 为 \"table\" 时有效)。", Optional: true}, {Name: "continuation_caption", Type: "string", Doc: "定义续表题文字(仅当 type 为 \"table\" 时有效)。", Optional: true}, {Name: "continuation_caption_style", Type: "*CaptionStyle", Doc: "定义续表题样式(仅当 type 为 \"table\" 时有效)。", Optional: true}, {Name: "align", Type: "string", Doc: "指定图片与说明文字共用的水平对齐(仅当 type 为 \"figure\" 时有效)。", Optional: true}, {Name: "image_width", Type: "float64", Doc: "定义图片宽度(仅当 type 为 \"figure\" 时有效)。", Optional: true}, {Name: "image_fill_width", Type: "bool", Doc: "指示 image_width 是否按图块宽度的比例解释(仅当 type 为 \"figure\" 时有效)。", Optional: true}, {Name: "image_height", Type: "float64", Doc: "定义图片高度(仅当 type 为 \"figure\" 时有效)。", Optional: true}, {Name: "fit", Type: "string", Doc: "指定图片在给定尺寸内的适配方式:contain 保持比例,stretch 拉伸(仅当 type 为 \"figure\" 时有效)。", Optional: true}, }}, {Name: "TemplateRef", Path: "pages[].templates[]", Doc: "描述页面对模板页的引用。", Fields: []FieldDoc{ {Name: "id", Type: "uint64", Doc: "指定所引用的模板页。", Optional: true}, {Name: "z_order", Type: "string", Doc: "指定模板引用的层叠顺序。", Optional: true}, }}, {Name: "PageResource", Path: "pages[].resources[]", Doc: "描述页面级资源文件或嵌入式图像。", Fields: []FieldDoc{ {Name: "file", Type: "string", Doc: "指定页面资源文件路径。", Optional: true}, {Name: "data_base64", Type: "string", Doc: "提供 Base64 编码的页面资源数据。", Optional: true}, {Name: "images", Type: "[]PageImage", Doc: "定义资源中的图像。", Optional: true}, {Name: "files", Type: "[]ResourceFile", Doc: "定义页面资源包中的文件。", Optional: true}, }}, {Name: "ActionRegion", Path: "document.actions[].region", Doc: "描述动作的触发区域。", Fields: []FieldDoc{ {Name: "areas", Type: "[]ActionArea", Doc: "定义动作区域中的路径。", Optional: true}, }}, {Name: "URIAction", Path: "document.actions[].uri", Doc: "描述打开或跳转到 URI 的动作。", Fields: []FieldDoc{ {Name: "uri", Type: "string", Doc: "指定目标 URI。", Optional: true}, {Name: "base", Type: "string", Doc: "指定 URI 基础地址。", Optional: true}, {Name: "target", Type: "string", Doc: "指定 URI 打开目标。", Optional: true}, }}, {Name: "GotoAction", Path: "document.actions[].goto", Doc: "描述跳转到页面、书签或页面位置的动作。", Fields: []FieldDoc{ {Name: "page", Type: "int", Doc: "指定跳转目标页码。", Optional: true}, {Name: "type", Type: "string", Doc: "指定跳转目标类型。", Optional: true}, {Name: "bookmark", Type: "string", Doc: "指定跳转目标书签名称。", Optional: true}, {Name: "left", Type: "*float64", Doc: "指定目标视图左边界。", Optional: true}, {Name: "top", Type: "*float64", Doc: "指定目标视图上边界。", Optional: true}, {Name: "right", Type: "*float64", Doc: "指定目标视图右边界。", Optional: true}, {Name: "bottom", Type: "*float64", Doc: "指定目标视图下边界。", Optional: true}, {Name: "zoom", Type: "*float64", Doc: "指定目标视图缩放比例。", Optional: true}, }}, {Name: "GotoAAction", Path: "document.actions[].goto_a", Doc: "描述跳转到附件的动作。", Fields: []FieldDoc{ {Name: "attach_id", Type: "string", Doc: "指定跳转目标附件标识。", Optional: true}, {Name: "new_window", Type: "*bool", Doc: "指示是否在新窗口打开附件。", Optional: true}, }}, {Name: "SoundAction", Path: "document.actions[].sound", Doc: "描述播放声音资源的动作。", Fields: []FieldDoc{ {Name: "resource_id", Type: "uint64", Doc: "指定声音资源编号。", Optional: true}, {Name: "volume", Type: "*int", Doc: "指定播放音量。", Optional: true}, {Name: "repeat", Type: "*bool", Doc: "指示是否循环播放。", Optional: true}, {Name: "synchronous", Type: "*bool", Doc: "指示是否同步播放。", Optional: true}, }}, {Name: "MovieAction", Path: "document.actions[].movie", Doc: "描述播放媒体资源的动作。", Fields: []FieldDoc{ {Name: "resource_id", Type: "uint64", Doc: "指定媒体资源编号。", Optional: true}, {Name: "operator", Type: "string", Doc: "指定媒体操作类型。", Optional: true}, }}, {Name: "ExtensionProperty", Path: "document.extensions[].properties[]", Doc: "描述扩展信息的属性。", Fields: []FieldDoc{ {Name: "name", Type: "string", Doc: "指定属性名称。", Optional: true}, {Name: "type", Type: "string", Doc: "指定属性类型。", Optional: true}, {Name: "value", Type: "string", Doc: "指定属性值。", Optional: true}, }}, {Name: "VersionFile", Path: "document.versions[].files[]", Doc: "描述文档版本中的文件。", Fields: []FieldDoc{ {Name: "id", Type: "string", Doc: "标识版本文件。", Optional: true}, {Name: "path", Type: "string", Doc: "指定文件在版本中的路径。", Optional: true}, }}, {Name: "Annotation", Path: "document.annotations[].items[]", Doc: "描述文档批注。", Fields: []FieldDoc{ {Name: "id", Type: "uint64", Doc: "标识批注。", Optional: true}, {Name: "type", Type: "string", Doc: "指定批注类型。", Optional: true}, {Name: "creator", Type: "string", Doc: "指定批注创建者。", Optional: true}, {Name: "last_mod_date", Type: "string", Doc: "记录批注最后修改时间。", Optional: true}, {Name: "visible", Type: "*bool", Doc: "指示批注是否可见。", Optional: true}, {Name: "subtype", Type: "string", Doc: "指定批注子类型。", Optional: true}, {Name: "print", Type: "*bool", Doc: "指示批注是否随文档打印。", Optional: true}, {Name: "no_zoom", Type: "bool", Doc: "指示批注是否不随页面缩放。", Optional: true}, {Name: "no_rotate", Type: "bool", Doc: "指示批注是否不随页面旋转。", Optional: true}, {Name: "read_only", Type: "*bool", Doc: "指示批注是否只读。", Optional: true}, {Name: "remark", Type: "string", Doc: "记录批注说明。", Optional: true}, {Name: "parameters", Type: "[]AnnotationParameter", Doc: "定义批注自定义参数。", Optional: true}, {Name: "boundary", Type: "*Box", Doc: "指定批注边界。", Optional: true}, {Name: "items", Type: "[]Item", Doc: "定义批注包含的图元。", Optional: true}, }}, {Name: "Box", Path: "document.area.physical_box", Doc: "描述矩形区域。", Fields: []FieldDoc{ {Name: "x", Type: "float64", Doc: "指定矩形左上角横坐标。", Optional: true}, {Name: "y", Type: "float64", Doc: "指定矩形左上角纵坐标。", Optional: true}, {Name: "width", Type: "float64", Doc: "指定矩形宽度。", Optional: true}, {Name: "height", Type: "float64", Doc: "指定矩形高度。", Optional: true}, }}, {Name: "PrintSettings", Path: "document.permissions.print", Doc: "描述文档打印设置。", Fields: []FieldDoc{ {Name: "printable", Type: "bool", Doc: "指示是否允许打印。", Optional: true}, {Name: "copies", Type: "*int", Doc: "指定允许或默认的打印份数。", Optional: true}, }}, {Name: "ValidPeriod", Path: "document.permissions.valid_period", Doc: "描述权限的有效时间范围。", Fields: []FieldDoc{ {Name: "start", Type: "string", Doc: "指定权限生效时间。", Optional: true}, {Name: "end", Type: "string", Doc: "指定权限失效时间。", Optional: true}, }}, {Name: "SignatureReference", Path: "document.signatures[].references[]", Doc: "描述数字签名引用的文件及校验值。", Fields: []FieldDoc{ {Name: "file_ref", Type: "string", Doc: "指定签名引用的文件路径。", Optional: true}, {Name: "check_value", Type: "string", Doc: "提供 Base64 编码的文件校验值。", Optional: true}, }}, {Name: "SignatureStamp", Path: "document.signatures[].stamp_annots[]", Doc: "描述数字签名在页面上的盖章区域。", Fields: []FieldDoc{ {Name: "id", Type: "string", Doc: "标识签名盖章区域。", Optional: true}, {Name: "page", Type: "int", Doc: "指定盖章所在页码。", Optional: true}, {Name: "boundary", Type: "Box", Doc: "指定盖章区域边界。", Optional: true}, {Name: "clip", Type: "*Box", Doc: "指定盖章区域裁剪框。", Optional: true}, }}, {Name: "Color", Path: "resources.draw_params[].fill_color", Doc: "描述颜色及其渐变或图案填充信息。", Fields: []FieldDoc{ {Name: "r", Type: "uint8", Doc: "指定红色分量。", Optional: true}, {Name: "g", Type: "uint8", Doc: "指定绿色分量。", Optional: true}, {Name: "b", Type: "uint8", Doc: "指定蓝色分量。", Optional: true}, {Name: "components", Type: "[]int", Doc: "指定颜色空间分量值。", Optional: true}, {Name: "color_space", Type: "uint64", Doc: "指定颜色空间资源编号。", Optional: true}, {Name: "index", Type: "*int", Doc: "指定调色板颜色索引。", Optional: true}, {Name: "alpha", Type: "*uint8", Doc: "指定颜色透明度。", Optional: true}, {Name: "axial", Type: "*AxialShading", Doc: "定义轴向渐变。", Optional: true}, {Name: "radial", Type: "*RadialShading", Doc: "定义径向渐变。", Optional: true}, {Name: "gouraud", Type: "*Gouraud", Doc: "定义三角网格渐变。", Optional: true}, {Name: "la_gouraud", Type: "*LaGouraud", Doc: "定义四边形网格渐变。", Optional: true}, {Name: "pattern", Type: "*Pattern", Doc: "定义图案填充。", Optional: true}, }}, {Name: "ResourceFile", Path: "resources.public[].files[]", Doc: "描述资源包中的文件。", Fields: []FieldDoc{ {Name: "path", Type: "string", Doc: "指定文件在资源包中的路径。", Optional: true}, {Name: "file", Type: "string", Doc: "指定源文件路径。", Optional: true}, {Name: "data_base64", Type: "string", Doc: "提供 Base64 编码的文件数据。", Optional: true}, }}, {Name: "TextCode", Path: "templates[].items[].text_codes[]", Doc: "描述文本内容及其定位信息。", Fields: []FieldDoc{ {Name: "value", Type: "string", Doc: "指定文本内容。", Optional: true}, {Name: "x", Type: "*float64", Doc: "指定文本代码横坐标。", Optional: true}, {Name: "y", Type: "*float64", Doc: "指定文本代码纵坐标。", Optional: true}, {Name: "delta_x", Type: "[]float64", Doc: "指定连续字符的横向偏移量。", Optional: true}, {Name: "delta_y", Type: "[]float64", Doc: "指定连续字符的纵向偏移量。", Optional: true}, }}, {Name: "CGTransform", Path: "templates[].items[].cg_transforms[]", Doc: "描述文本代码与字形之间的映射关系。", Fields: []FieldDoc{ {Name: "code_position", Type: "int", Doc: "指定文本代码起始位置。", Optional: true}, {Name: "code_count", Type: "int", Doc: "指定映射的文本代码数量。", Optional: true}, {Name: "glyph_count", Type: "int", Doc: "指定对应的字形数量。", Optional: true}, {Name: "glyphs", Type: "[]int", Doc: "指定对应字形编号列表。", Optional: true}, }}, {Name: "Clip", Path: "templates[].items[].clips[]", Doc: "描述图元的裁剪区域集合。", Fields: []FieldDoc{ {Name: "areas", Type: "[]ClipArea", Doc: "定义裁剪区域。", Optional: true}, }}, {Name: "ImageBorder", Path: "templates[].items[].border", Doc: "描述图像边框的绘制样式。", Fields: []FieldDoc{ {Name: "line_width", Type: "float64", Doc: "指定图像边框线宽。", Optional: true}, {Name: "horizontal_radius", Type: "float64", Doc: "指定边框水平圆角半径。", Optional: true}, {Name: "vertical_radius", Type: "float64", Doc: "指定边框垂直圆角半径。", Optional: true}, {Name: "dash_offset", Type: "float64", Doc: "指定边框虚线起始偏移量。", Optional: true}, {Name: "dash_pattern", Type: "[]float64", Doc: "指定边框虚线长度模式。", Optional: true}, {Name: "color", Type: "*Color", Doc: "指定边框颜色。", Optional: true}, }}, {Name: "TableRow", Path: "templates[].items[].rows[]", Doc: "定义表格行。", Fields: []FieldDoc{ {Name: "cells", Type: "[]TableCell", Doc: "定义该行包含的单元格。", Optional: true}, }}, {Name: "TableStyle", Path: "templates[].items[].style", Doc: "定义表格样式。", Fields: []FieldDoc{ {Name: "horizontal_lines", Type: "bool", Doc: "指示是否绘制横线。", Optional: true}, {Name: "vertical_lines", Type: "bool", Doc: "指示是否绘制竖线。", Optional: true}, {Name: "line_width", Type: "float64", Doc: "定义内部线宽。", Optional: true}, {Name: "stroke_color", Type: "*Color", Doc: "定义边框颜色。", Optional: true}, {Name: "outer_line_width", Type: "float64", Doc: "定义外框线宽。", Optional: true}, {Name: "header_line_width", Type: "float64", Doc: "定义表头分隔线宽。", Optional: true}, {Name: "header_fill_color", Type: "*Color", Doc: "定义表头背景色。", Optional: true}, {Name: "header_font", Type: "string", Doc: "定义表头字体。", Optional: true}, {Name: "header_size", Type: "float64", Doc: "定义表头字号。", Optional: true}, {Name: "header_weight", Type: "int", Doc: "定义表头字重。", Optional: true}, {Name: "strike_color", Type: "*Color", Doc: "定义 Markdown 删除线的颜色;不设时与边框同色。", Optional: true}, {Name: "link_color", Type: "*Color", Doc: "定义 Markdown 行内链接的文字颜色;不设时用默认链接蓝。", Optional: true}, {Name: "rule_color", Type: "*Color", Doc: "定义 Markdown 分隔线的颜色;不设时与边框同色。", Optional: true}, {Name: "code_font", Type: "string", Doc: "定义 Markdown 行内代码使用的字体。", Optional: true}, }}, {Name: "CaptionStyle", Path: "templates[].items[].caption_style", Doc: "定义表题样式。", Fields: []FieldDoc{ {Name: "font", Type: "string", Doc: "定义字体。", Optional: true}, {Name: "size", Type: "float64", Doc: "定义字号。", Optional: true}, {Name: "weight", Type: "int", Doc: "定义字重。", Optional: true}, {Name: "italic", Type: "bool", Doc: "指示是否斜体。", Optional: true}, {Name: "align", Type: "string", Doc: "定义对齐方式。", Optional: true}, {Name: "color", Type: "*Color", Doc: "定义文字颜色。", Optional: true}, {Name: "gap", Type: "float64", Doc: "定义说明文字与所标注对象之间的间距,单位毫米。", Optional: true}, }}, {Name: "PageImage", Path: "pages[].resources[].images[]", Doc: "描述页面资源中的图像。", Fields: []FieldDoc{ {Name: "id", Type: "uint64", Doc: "标识页面图像资源。", Optional: true}, {Name: "format", Type: "string", Doc: "指定图像格式。", Optional: true}, {Name: "name", Type: "string", Doc: "指定图像名称。", Optional: true}, {Name: "file", Type: "string", Doc: "指定图像文件路径。", Optional: true}, {Name: "data_base64", Type: "string", Doc: "提供 Base64 编码的图像数据。", Optional: true}, }}, {Name: "ActionArea", Path: "document.actions[].region.areas[]", Doc: "描述触发区域中的一条路径。", Fields: []FieldDoc{ {Name: "start", Type: "Point", Doc: "指定路径起点。", Optional: true}, {Name: "commands", Type: "[]RegionCommand", Doc: "定义路径绘制命令。", Optional: true}, }}, {Name: "AnnotationParameter", Path: "document.annotations[].items[].parameters[]", Doc: "描述批注的自定义参数。", Fields: []FieldDoc{ {Name: "name", Type: "string", Doc: "指定批注参数名称。", Optional: true}, {Name: "value", Type: "string", Doc: "指定批注参数值。", Optional: true}, }}, {Name: "AxialShading", Path: "resources.draw_params[].fill_color.axial", Doc: "描述轴向渐变。", Fields: []FieldDoc{ {Name: "map_type", Type: "string", Doc: "指定渐变映射类型。", Optional: true}, {Name: "map_unit", Type: "float64", Doc: "指定渐变映射单位。", Optional: true}, {Name: "extend", Type: "int", Doc: "指定渐变端点的延伸方式。", Optional: true}, {Name: "start_point", Type: "string", Doc: "指定渐变起点。", Optional: true}, {Name: "end_point", Type: "string", Doc: "指定渐变终点。", Optional: true}, {Name: "segments", Type: "[]ColorStop", Doc: "定义渐变颜色停止点。", Optional: true}, }}, {Name: "RadialShading", Path: "resources.draw_params[].fill_color.radial", Doc: "描述径向渐变。", Fields: []FieldDoc{ {Name: "map_type", Type: "string", Doc: "指定渐变映射类型。", Optional: true}, {Name: "map_unit", Type: "float64", Doc: "指定渐变映射单位。", Optional: true}, {Name: "eccentricity", Type: "float64", Doc: "指定径向渐变椭圆离心率。", Optional: true}, {Name: "angle", Type: "float64", Doc: "指定径向渐变旋转角度。", Optional: true}, {Name: "start_point", Type: "string", Doc: "指定渐变起点圆心。", Optional: true}, {Name: "start_radius", Type: "float64", Doc: "指定渐变起始半径。", Optional: true}, {Name: "end_point", Type: "string", Doc: "指定渐变终点圆心。", Optional: true}, {Name: "end_radius", Type: "float64", Doc: "指定渐变结束半径。", Optional: true}, {Name: "extend", Type: "int", Doc: "指定渐变端点的延伸方式。", Optional: true}, {Name: "segments", Type: "[]ColorStop", Doc: "定义渐变颜色停止点。", Optional: true}, }}, {Name: "Gouraud", Path: "resources.draw_params[].fill_color.gouraud", Doc: "描述 Gouraud 三角网格渐变。", Fields: []FieldDoc{ {Name: "extend", Type: "int", Doc: "指定渐变边界的延伸方式。", Optional: true}, {Name: "points", Type: "[]GouraudPoint", Doc: "定义三角网格顶点。", Optional: true}, {Name: "back_color", Type: "*Color", Doc: "指定网格背景颜色。", Optional: true}, }}, {Name: "LaGouraud", Path: "resources.draw_params[].fill_color.la_gouraud", Doc: "描述 LaGouraud 四边形网格渐变。", Fields: []FieldDoc{ {Name: "vertices_per_row", Type: "int", Doc: "指定每行顶点数。", Optional: true}, {Name: "extend", Type: "int", Doc: "指定渐变边界的延伸方式。", Optional: true}, {Name: "points", Type: "[]LaGouraudPoint", Doc: "定义四边形网格顶点。", Optional: true}, {Name: "back_color", Type: "*Color", Doc: "指定网格背景颜色。", Optional: true}, }}, {Name: "Pattern", Path: "resources.draw_params[].fill_color.pattern", Doc: "描述图案填充及其内容。", Fields: []FieldDoc{ {Name: "width", Type: "float64", Doc: "指定图案单元宽度。", Optional: true}, {Name: "height", Type: "float64", Doc: "指定图案单元高度。", Optional: true}, {Name: "x_step", Type: "float64", Doc: "指定图案在横向的重复步长。", Optional: true}, {Name: "y_step", Type: "float64", Doc: "指定图案在纵向的重复步长。", Optional: true}, {Name: "reflect_method", Type: "string", Doc: "指定图案反射方式。", Optional: true}, {Name: "relative_to", Type: "string", Doc: "指定图案定位所依据的对象。", Optional: true}, {Name: "ctm", Type: "[]float64", Doc: "指定图案的坐标变换矩阵。", Optional: true}, {Name: "thumbnail", Type: "uint64", Doc: "指定图案缩略图资源编号。", Optional: true}, {Name: "items", Type: "[]Item", Doc: "定义图案中的图元。", Optional: true}, {Name: "layers", Type: "[]Layer", Doc: "定义图案中的图层。", Optional: true}, }}, {Name: "ClipArea", Path: "templates[].items[].clips[].areas[]", Doc: "描述裁剪区域中的一个路径或文本区域。", Fields: []FieldDoc{ {Name: "draw_param", Type: "string", Doc: "指定裁剪区域使用的绘制参数名称。", Optional: true}, {Name: "ctm", Type: "[]float64", Doc: "指定裁剪区域的坐标变换矩阵。", Optional: true}, {Name: "path", Type: "*ClipPath", Doc: "定义路径裁剪内容。", Optional: true}, {Name: "text", Type: "*ClipText", Doc: "定义文本裁剪内容。", Optional: true}, }}, {Name: "TableCell", Path: "templates[].items[].rows[].cells[]", Doc: "定义表格单元格。", Fields: []FieldDoc{ {Name: "value", Type: "string", Doc: "定义单元格文本内容。", Optional: true}, {Name: "font", Type: "string", Doc: "定义字体。", Optional: true}, {Name: "size", Type: "float64", Doc: "定义字号。", Optional: true}, {Name: "weight", Type: "int", Doc: "定义字重。", Optional: true}, {Name: "italic", Type: "bool", Doc: "指示是否斜体。", Optional: true}, {Name: "align", Type: "string", Doc: "定义对齐方式(left/center/right)。", Optional: true}, {Name: "col_span", Type: "int", Doc: "定义横向合并的列数。", Optional: true}, {Name: "row_span", Type: "int", Doc: "定义纵向合并的行数。", Optional: true}, {Name: "first_line_indent", Type: "float64", Doc: "定义首行缩进。", Optional: true}, {Name: "hanging_indent", Type: "float64", Doc: "定义续行缩进。", Optional: true}, {Name: "format", Type: "string", Doc: "定义文本格式(text/markdown)。", Optional: true}, {Name: "fill_color", Type: "*Color", Doc: "定义单元格背景色。", Optional: true}, {Name: "actions", Type: "[]Action", Doc: "定义单元格的点击动作,作用范围是整个单元格。", Optional: true}, }}, {Name: "Point", Path: "document.actions[].region.areas[].start", Doc: "描述二维坐标点。", Fields: []FieldDoc{ {Name: "x", Type: "float64", Doc: "指定横坐标。", Optional: true}, {Name: "y", Type: "float64", Doc: "指定纵坐标。", Optional: true}, }}, {Name: "RegionCommand", Path: "document.actions[].region.areas[].commands[]", Doc: "描述动作区域路径中的绘制命令。", Fields: []FieldDoc{ {Name: "type", Type: "string", Doc: "指定路径命令类型。", Optional: true}, {Name: "x", Type: "float64", Doc: "指定命令终点横坐标。", Optional: true}, {Name: "y", Type: "float64", Doc: "指定命令终点纵坐标。", Optional: true}, {Name: "control_x", Type: "float64", Doc: "指定二次贝塞尔曲线控制点横坐标。", Optional: true}, {Name: "control_y", Type: "float64", Doc: "指定二次贝塞尔曲线控制点纵坐标。", Optional: true}, {Name: "control_1_x", Type: "float64", Doc: "指定三次贝塞尔曲线第一个控制点横坐标。", Optional: true}, {Name: "control_1_y", Type: "float64", Doc: "指定三次贝塞尔曲线第一个控制点纵坐标。", Optional: true}, {Name: "control_2_x", Type: "float64", Doc: "指定三次贝塞尔曲线第二个控制点横坐标。", Optional: true}, {Name: "control_2_y", Type: "float64", Doc: "指定三次贝塞尔曲线第二个控制点纵坐标。", Optional: true}, {Name: "sweep_direction", Type: "bool", Doc: "指定椭圆弧的扫描方向。", Optional: true}, {Name: "large_arc", Type: "bool", Doc: "指示椭圆弧是否取大弧段。", Optional: true}, {Name: "rotation_angle", Type: "float64", Doc: "指定椭圆弧旋转角度。", Optional: true}, {Name: "ellipse_width", Type: "float64", Doc: "指定椭圆弧椭圆宽度。", Optional: true}, {Name: "ellipse_height", Type: "float64", Doc: "指定椭圆弧椭圆高度。", Optional: true}, }}, {Name: "ColorStop", Path: "resources.draw_params[].fill_color.axial.segments[]", Doc: "描述渐变中的颜色停止点。", Fields: []FieldDoc{ {Name: "position", Type: "*float64", Doc: "指定颜色在渐变中的位置。省略时不写出,由渲染按首尾补齐。", Optional: true}, {Name: "color", Type: "Color", Doc: "指定该位置的颜色。", Optional: false}, }}, {Name: "GouraudPoint", Path: "resources.draw_params[].fill_color.gouraud.points[]", Doc: "描述 Gouraud 渐变网格中的顶点。", Fields: []FieldDoc{ {Name: "x", Type: "float64", Doc: "指定顶点横坐标。", Optional: true}, {Name: "y", Type: "float64", Doc: "指定顶点纵坐标。", Optional: true}, {Name: "edge_flag", Type: "int", Doc: "指定顶点边标志。", Optional: true}, {Name: "color", Type: "Color", Doc: "指定顶点颜色。", Optional: true}, }}, {Name: "LaGouraudPoint", Path: "resources.draw_params[].fill_color.la_gouraud.points[]", Doc: "描述 LaGouraud 渐变网格中的顶点。", Fields: []FieldDoc{ {Name: "x", Type: "float64", Doc: "指定顶点横坐标。", Optional: true}, {Name: "y", Type: "float64", Doc: "指定顶点纵坐标。", Optional: true}, {Name: "color", Type: "Color", Doc: "指定顶点颜色。", Optional: true}, }}, {Name: "ClipPath", Path: "templates[].items[].clips[].areas[].path", Doc: "描述用于裁剪的路径。", Fields: []FieldDoc{ {Name: "boundary", Type: "Box", Doc: "指定裁剪路径边界。", Optional: true}, {Name: "name", Type: "string", Doc: "指定裁剪路径名称。", Optional: true}, {Name: "visible", Type: "*bool", Doc: "指示裁剪路径是否可见。", Optional: true}, {Name: "ctm", Type: "[]float64", Doc: "指定裁剪路径的坐标变换矩阵。", Optional: true}, {Name: "data", Type: "string", Doc: "指定裁剪路径数据。", Optional: true}, {Name: "stroke", Type: "bool", Doc: "指示是否绘制裁剪路径轮廓。", Optional: true}, {Name: "stroke_set", Type: "*bool", Doc: "指示是否显式设置描边属性。", Optional: true}, {Name: "fill", Type: "bool", Doc: "指示是否填充裁剪路径。", Optional: true}, {Name: "rule", Type: "string", Doc: "指定裁剪路径填充规则。", Optional: true}, {Name: "line_width", Type: "float64", Doc: "指定裁剪路径描边线宽。", Optional: true}, {Name: "cap", Type: "string", Doc: "指定裁剪路径端点样式。", Optional: true}, {Name: "join", Type: "string", Doc: "指定裁剪路径连接样式。", Optional: true}, {Name: "miter_limit", Type: "float64", Doc: "指定斜接长度限制。", Optional: true}, {Name: "dash_offset", Type: "float64", Doc: "指定虚线起始偏移量。", Optional: true}, {Name: "dash_pattern", Type: "[]float64", Doc: "指定虚线长度模式。", Optional: true}, {Name: "alpha", Type: "*uint8", Doc: "指定裁剪路径透明度。", Optional: true}, {Name: "stroke_color", Type: "*Color", Doc: "指定裁剪路径描边颜色。", Optional: true}, {Name: "fill_color", Type: "*Color", Doc: "指定裁剪路径填充颜色。", Optional: true}, }}, {Name: "ClipText", Path: "templates[].items[].clips[].areas[].text", Doc: "描述用于裁剪的文本。", Fields: []FieldDoc{ {Name: "boundary", Type: "Box", Doc: "指定裁剪文本边界。", Optional: false}, {Name: "ctm", Type: "[]float64", Doc: "指定裁剪文本的坐标变换矩阵。", Optional: true}, {Name: "font", Type: "string", Doc: "指定裁剪文本使用的字体名称。", Optional: true}, {Name: "size", Type: "float64", Doc: "指定裁剪文本字号。", Optional: true}, {Name: "value", Type: "string", Doc: "指定裁剪文本内容。", Optional: true}, {Name: "text_codes", Type: "[]TextCode", Doc: "定义裁剪文本代码。", Optional: true}, {Name: "stroke", Type: "bool", Doc: "指示是否绘制文本轮廓。", Optional: true}, {Name: "fill", Type: "*bool", Doc: "指示是否填充文本。", Optional: true}, {Name: "h_scale", Type: "float64", Doc: "指定文本水平方向缩放比例。", Optional: true}, {Name: "read_direction", Type: "int", Doc: "指定文本阅读方向。", Optional: true}, {Name: "char_direction", Type: "int", Doc: "指定字符排列方向。", Optional: true}, {Name: "weight", Type: "int", Doc: "指定文本字重。", Optional: true}, {Name: "italic", Type: "bool", Doc: "指示文本是否为斜体。", Optional: true}, {Name: "fill_color", Type: "*Color", Doc: "指定文本填充颜色。", Optional: true}, {Name: "stroke_color", Type: "*Color", Doc: "指定文本描边颜色。", Optional: true}, }}, }
SchemaDocs 是 manifest 的结构体说明集合,由 internal/manifest/fielddocs 从 manifest.go 的文档注释提取,供 ofd-creator schema 输出字段参考文档。改动 manifest 字段后执行 go generate ./internal/manifest 更新。 每个结构体只展开一次,Path 记录首次到达它的示例路径。
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
// Event 指定触发动作的事件。
Event string `json:"event,omitempty" yaml:"event,omitempty" toml:"event,omitempty"`
// Region 定义动作触发区域。
Region *ActionRegion `json:"region,omitempty" yaml:"region,omitempty" toml:"region,omitempty"`
// URI 定义打开或跳转到 URI 的动作。
URI *URIAction `json:"uri,omitempty" yaml:"uri,omitempty" toml:"uri,omitempty"`
// Goto 定义跳转到页面或位置的动作。
Goto *GotoAction `json:"goto,omitempty" yaml:"goto,omitempty" toml:"goto,omitempty"`
// GotoA 定义跳转到附件的动作。
GotoA *GotoAAction `json:"goto_a,omitempty" yaml:"goto_a,omitempty" toml:"goto_a,omitempty"`
// Sound 定义播放声音资源的动作。
Sound *SoundAction `json:"sound,omitempty" yaml:"sound,omitempty" toml:"sound,omitempty"`
// Movie 定义播放媒体资源的动作。
Movie *MovieAction `json:"movie,omitempty" yaml:"movie,omitempty" toml:"movie,omitempty"`
}
Action 描述文档、页面或图元触发的动作。
type ActionArea ¶
type ActionArea struct {
// Start 指定路径起点。
Start Point `json:"start,omitempty" yaml:"start,omitempty" toml:"start,omitempty"`
// Commands 定义路径绘制命令。
Commands []RegionCommand `json:"commands,omitempty" yaml:"commands,omitempty" toml:"commands,omitempty"`
}
ActionArea 描述触发区域中的一条路径。
type ActionRegion ¶
type ActionRegion struct {
// Areas 定义动作区域中的路径。
Areas []ActionArea `json:"areas,omitempty" yaml:"areas,omitempty" toml:"areas,omitempty"`
}
ActionRegion 描述动作的触发区域。
type Annotation ¶
type Annotation struct {
// ID 标识批注。
ID uint64 `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Type 指定批注类型。
Type string `json:"type,omitempty" yaml:"type,omitempty" toml:"type,omitempty"`
// Creator 指定批注创建者。
Creator string `json:"creator,omitempty" yaml:"creator,omitempty" toml:"creator,omitempty"`
// LastModDate 记录批注最后修改时间。
LastModDate string `json:"last_mod_date,omitempty" yaml:"last_mod_date,omitempty" toml:"last_mod_date,omitempty"`
// Visible 指示批注是否可见。
Visible *bool `json:"visible,omitempty" yaml:"visible,omitempty" toml:"visible,omitempty"`
// Subtype 指定批注子类型。
Subtype string `json:"subtype,omitempty" yaml:"subtype,omitempty" toml:"subtype,omitempty"`
// Print 指示批注是否随文档打印。
Print *bool `json:"print,omitempty" yaml:"print,omitempty" toml:"print,omitempty"`
// NoZoom 指示批注是否不随页面缩放。
NoZoom bool `json:"no_zoom,omitempty" yaml:"no_zoom,omitempty" toml:"no_zoom,omitempty"`
// NoRotate 指示批注是否不随页面旋转。
NoRotate bool `json:"no_rotate,omitempty" yaml:"no_rotate,omitempty" toml:"no_rotate,omitempty"`
// ReadOnly 指示批注是否只读。
ReadOnly *bool `json:"read_only,omitempty" yaml:"read_only,omitempty" toml:"read_only,omitempty"`
// Remark 记录批注说明。
Remark string `json:"remark,omitempty" yaml:"remark,omitempty" toml:"remark,omitempty"`
// Parameters 定义批注自定义参数。
Parameters []AnnotationParameter `json:"parameters,omitempty" yaml:"parameters,omitempty" toml:"parameters,omitempty"`
// Boundary 指定批注边界。
Boundary *Box `json:"boundary,omitempty" yaml:"boundary,omitempty" toml:"boundary,omitempty"`
// Items 定义批注包含的图元。
Items []Item `json:"items,omitempty" yaml:"items,omitempty" toml:"items,omitempty"`
}
Annotation 描述文档批注。
type AnnotationPage ¶
type AnnotationPage struct {
// Page 指定批注所属页码。
Page int `json:"page,omitempty" yaml:"page,omitempty" toml:"page,omitempty"`
// Items 定义该页面上的批注。
Items []Annotation `json:"items,omitempty" yaml:"items,omitempty" toml:"items,omitempty"`
}
AnnotationPage 描述某一页面上的批注集合。
type AnnotationParameter ¶
type AnnotationParameter struct {
// Name 指定批注参数名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// Value 指定批注参数值。
Value string `json:"value,omitempty" yaml:"value,omitempty" toml:"value,omitempty"`
}
AnnotationParameter 描述批注的自定义参数。
type Attachment ¶
type Attachment struct {
// ID 标识附件。
ID string `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Name 指定附件名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// Format 指定附件格式。
Format string `json:"format,omitempty" yaml:"format,omitempty" toml:"format,omitempty"`
// Usage 说明附件用途。
Usage string `json:"usage,omitempty" yaml:"usage,omitempty" toml:"usage,omitempty"`
// File 指定附件文件路径。
File string `json:"file,omitempty" yaml:"file,omitempty" toml:"file,omitempty"`
// DataBase64 提供 Base64 编码的附件数据。
DataBase64 string `json:"data_base64,omitempty" yaml:"data_base64,omitempty" toml:"data_base64,omitempty"`
// FileName 指定附件在文档中的文件名。
FileName string `json:"file_name,omitempty" yaml:"file_name,omitempty" toml:"file_name,omitempty"`
// CreationDate 记录附件创建时间。
CreationDate string `json:"creation_date,omitempty" yaml:"creation_date,omitempty" toml:"creation_date,omitempty"`
// ModDate 记录附件最后修改时间。
ModDate string `json:"mod_date,omitempty" yaml:"mod_date,omitempty" toml:"mod_date,omitempty"`
// Visible 指示附件是否可见。
Visible *bool `json:"visible,omitempty" yaml:"visible,omitempty" toml:"visible,omitempty"`
}
Attachment 描述文档附件。
type AxialShading ¶
type AxialShading struct {
// MapType 指定渐变映射类型。
MapType string `json:"map_type,omitempty" yaml:"map_type,omitempty" toml:"map_type,omitempty"`
// MapUnit 指定渐变映射单位。
MapUnit float64 `json:"map_unit,omitempty" yaml:"map_unit,omitempty" toml:"map_unit,omitempty"`
// Extend 指定渐变端点的延伸方式。
Extend int `json:"extend,omitempty" yaml:"extend,omitempty" toml:"extend,omitempty"`
// StartPoint 指定渐变起点。
StartPoint string `json:"start_point,omitempty" yaml:"start_point,omitempty" toml:"start_point,omitempty"`
// EndPoint 指定渐变终点。
EndPoint string `json:"end_point,omitempty" yaml:"end_point,omitempty" toml:"end_point,omitempty"`
// Segments 定义渐变颜色停止点。
Segments []ColorStop `json:"segments,omitempty" yaml:"segments,omitempty" toml:"segments,omitempty"`
}
AxialShading 描述轴向渐变。
type Bookmark ¶
type Bookmark struct {
// Name 指定书签名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// Goto 指定书签跳转目标。
Goto GotoAction `json:"goto,omitempty" yaml:"goto,omitempty" toml:"goto,omitempty"`
}
Bookmark 描述文档书签及其跳转目标。
type Box ¶
type Box struct {
// X 指定矩形左上角横坐标。
X float64 `json:"x,omitempty" yaml:"x,omitempty" toml:"x,omitempty"`
// Y 指定矩形左上角纵坐标。
Y float64 `json:"y,omitempty" yaml:"y,omitempty" toml:"y,omitempty"`
// Width 指定矩形宽度。
Width float64 `json:"width,omitempty" yaml:"width,omitempty" toml:"width,omitempty"`
// Height 指定矩形高度。
Height float64 `json:"height,omitempty" yaml:"height,omitempty" toml:"height,omitempty"`
}
Box 描述矩形区域。
type BuildOptions ¶ added in v0.1.3
type BuildOptions struct {
// StreamAssets 对通过 file 引用的封面、图片、多媒体、附件和页面图片使用
// 惰性数据来源,避免创建超大 OFD 时把资源整体读入内存。
StreamAssets bool
// LoadAsset 可选,从内存读取通过 file 引用的资源;为空时从磁盘资源根目录读取。
// 设置后 StreamAssets 的惰性来源会退化为内存字节来源。
LoadAsset func(name string) ([]byte, error)
}
Build 将 manifest 转换为 creator 文档模型,并加载资源文件。 BuildOptions 控制 manifest 到 creator 文档的转换行为。
type CGTransform ¶
type CGTransform struct {
// CodePosition 指定文本代码起始位置。
CodePosition int `json:"code_position,omitempty" yaml:"code_position,omitempty" toml:"code_position,omitempty"`
// CodeCount 指定映射的文本代码数量。
CodeCount int `json:"code_count,omitempty" yaml:"code_count,omitempty" toml:"code_count,omitempty"`
// GlyphCount 指定对应的字形数量。
GlyphCount int `json:"glyph_count,omitempty" yaml:"glyph_count,omitempty" toml:"glyph_count,omitempty"`
// Glyphs 指定对应字形编号列表。
Glyphs []int `json:"glyphs,omitempty" yaml:"glyphs,omitempty" toml:"glyphs,omitempty"`
}
CGTransform 描述文本代码与字形之间的映射关系。
type CaptionStyle ¶ added in v0.1.5
type CaptionStyle struct {
// Font 定义字体。
Font string `json:"font,omitempty" yaml:"font,omitempty" toml:"font,omitempty"`
// Size 定义字号。
Size float64 `json:"size,omitempty" yaml:"size,omitempty" toml:"size,omitempty"`
// Weight 定义字重。
Weight int `json:"weight,omitempty" yaml:"weight,omitempty" toml:"weight,omitempty"`
// Italic 指示是否斜体。
Italic bool `json:"italic,omitempty" yaml:"italic,omitempty" toml:"italic,omitempty"`
// Align 定义对齐方式。
Align string `json:"align,omitempty" yaml:"align,omitempty" toml:"align,omitempty"`
// Color 定义文字颜色。
Color *Color `json:"color,omitempty" yaml:"color,omitempty" toml:"color,omitempty"`
// Gap 定义说明文字与所标注对象之间的间距,单位毫米。
Gap float64 `json:"gap,omitempty" yaml:"gap,omitempty" toml:"gap,omitempty"`
}
CaptionStyle 定义表题样式。
type Clip ¶
type Clip struct {
// Areas 定义裁剪区域。
Areas []ClipArea `json:"areas,omitempty" yaml:"areas,omitempty" toml:"areas,omitempty"`
}
Clip 描述图元的裁剪区域集合。
type ClipArea ¶
type ClipArea struct {
// DrawParam 指定裁剪区域使用的绘制参数名称。
DrawParam string `json:"draw_param,omitempty" yaml:"draw_param,omitempty" toml:"draw_param,omitempty"`
// CTM 指定裁剪区域的坐标变换矩阵。
CTM []float64 `json:"ctm,omitempty" yaml:"ctm,omitempty" toml:"ctm,omitempty"`
// Path 定义路径裁剪内容。
Path *ClipPath `json:"path,omitempty" yaml:"path,omitempty" toml:"path,omitempty"`
// Text 定义文本裁剪内容。
Text *ClipText `json:"text,omitempty" yaml:"text,omitempty" toml:"text,omitempty"`
}
ClipArea 描述裁剪区域中的一个路径或文本区域。
type ClipPath ¶
type ClipPath struct {
// Boundary 指定裁剪路径边界。
Boundary Box `json:"boundary,omitempty" yaml:"boundary,omitempty" toml:"boundary,omitempty"`
// Name 指定裁剪路径名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// Visible 指示裁剪路径是否可见。
Visible *bool `json:"visible,omitempty" yaml:"visible,omitempty" toml:"visible,omitempty"`
// CTM 指定裁剪路径的坐标变换矩阵。
CTM []float64 `json:"ctm,omitempty" yaml:"ctm,omitempty" toml:"ctm,omitempty"`
// Data 指定裁剪路径数据。
Data string `json:"data,omitempty" yaml:"data,omitempty" toml:"data,omitempty"`
// Stroke 指示是否绘制裁剪路径轮廓。
Stroke bool `json:"stroke,omitempty" yaml:"stroke,omitempty" toml:"stroke,omitempty"`
// StrokeSet 指示是否显式设置描边属性。
StrokeSet *bool `json:"stroke_set,omitempty" yaml:"stroke_set,omitempty" toml:"stroke_set,omitempty"`
// Fill 指示是否填充裁剪路径。
Fill bool `json:"fill,omitempty" yaml:"fill,omitempty" toml:"fill,omitempty"`
// Rule 指定裁剪路径填充规则。
Rule string `json:"rule,omitempty" yaml:"rule,omitempty" toml:"rule,omitempty"`
// LineWidth 指定裁剪路径描边线宽。
LineWidth float64 `json:"line_width,omitempty" yaml:"line_width,omitempty" toml:"line_width,omitempty"`
// Cap 指定裁剪路径端点样式。
Cap string `json:"cap,omitempty" yaml:"cap,omitempty" toml:"cap,omitempty"`
// Join 指定裁剪路径连接样式。
Join string `json:"join,omitempty" yaml:"join,omitempty" toml:"join,omitempty"`
// MiterLimit 指定斜接长度限制。
MiterLimit float64 `json:"miter_limit,omitempty" yaml:"miter_limit,omitempty" toml:"miter_limit,omitempty"`
// DashOffset 指定虚线起始偏移量。
DashOffset float64 `json:"dash_offset,omitempty" yaml:"dash_offset,omitempty" toml:"dash_offset,omitempty"`
// DashPattern 指定虚线长度模式。
DashPattern []float64 `json:"dash_pattern,omitempty" yaml:"dash_pattern,omitempty" toml:"dash_pattern,omitempty"`
// Alpha 指定裁剪路径透明度。
Alpha *uint8 `json:"alpha,omitempty" yaml:"alpha,omitempty" toml:"alpha,omitempty"`
// StrokeColor 指定裁剪路径描边颜色。
StrokeColor *Color `json:"stroke_color,omitempty" yaml:"stroke_color,omitempty" toml:"stroke_color,omitempty"`
// FillColor 指定裁剪路径填充颜色。
FillColor *Color `json:"fill_color,omitempty" yaml:"fill_color,omitempty" toml:"fill_color,omitempty"`
}
ClipPath 描述用于裁剪的路径。
type ClipText ¶
type ClipText struct {
// Boundary 指定裁剪文本边界。
Boundary Box `json:"boundary" yaml:"boundary,omitempty" toml:"boundary,omitempty"`
// CTM 指定裁剪文本的坐标变换矩阵。
CTM []float64 `json:"ctm,omitempty" yaml:"ctm,omitempty" toml:"ctm,omitempty"`
// Font 指定裁剪文本使用的字体名称。
Font string `json:"font,omitempty" yaml:"font,omitempty" toml:"font,omitempty"`
// Size 指定裁剪文本字号。
Size float64 `json:"size,omitempty" yaml:"size,omitempty" toml:"size,omitempty"`
// Value 指定裁剪文本内容。
Value string `json:"value,omitempty" yaml:"value,omitempty" toml:"value,omitempty"`
// TextCodes 定义裁剪文本代码。
TextCodes []TextCode `json:"text_codes,omitempty" yaml:"text_codes,omitempty" toml:"text_codes,omitempty"`
// Stroke 指示是否绘制文本轮廓。
Stroke bool `json:"stroke,omitempty" yaml:"stroke,omitempty" toml:"stroke,omitempty"`
// Fill 指示是否填充文本。
Fill *bool `json:"fill,omitempty" yaml:"fill,omitempty" toml:"fill,omitempty"`
// HScale 指定文本水平方向缩放比例。
HScale float64 `json:"h_scale,omitempty" yaml:"h_scale,omitempty" toml:"h_scale,omitempty"`
// ReadDirection 指定文本阅读方向。
ReadDirection int `json:"read_direction,omitempty" yaml:"read_direction,omitempty" toml:"read_direction,omitempty"`
// CharDirection 指定字符排列方向。
CharDirection int `json:"char_direction,omitempty" yaml:"char_direction,omitempty" toml:"char_direction,omitempty"`
// Weight 指定文本字重。
Weight int `json:"weight,omitempty" yaml:"weight,omitempty" toml:"weight,omitempty"`
// Italic 指示文本是否为斜体。
Italic bool `json:"italic,omitempty" yaml:"italic,omitempty" toml:"italic,omitempty"`
// FillColor 指定文本填充颜色。
FillColor *Color `json:"fill_color,omitempty" yaml:"fill_color,omitempty" toml:"fill_color,omitempty"`
// StrokeColor 指定文本描边颜色。
StrokeColor *Color `json:"stroke_color,omitempty" yaml:"stroke_color,omitempty" toml:"stroke_color,omitempty"`
}
ClipText 描述用于裁剪的文本。
type Color ¶
type Color struct {
// R 指定红色分量。
R uint8 `json:"r,omitempty" yaml:"r,omitempty" toml:"r,omitempty"`
// G 指定绿色分量。
G uint8 `json:"g,omitempty" yaml:"g,omitempty" toml:"g,omitempty"`
// B 指定蓝色分量。
B uint8 `json:"b,omitempty" yaml:"b,omitempty" toml:"b,omitempty"`
// Components 指定颜色空间分量值。
Components []int `json:"components,omitempty" yaml:"components,omitempty" toml:"components,omitempty"`
// ColorSpace 指定颜色空间资源编号。
ColorSpace uint64 `json:"color_space,omitempty" yaml:"color_space,omitempty" toml:"color_space,omitempty"`
// Index 指定调色板颜色索引。
Index *int `json:"index,omitempty" yaml:"index,omitempty" toml:"index,omitempty"`
// Alpha 指定颜色透明度。
Alpha *uint8 `json:"alpha,omitempty" yaml:"alpha,omitempty" toml:"alpha,omitempty"`
// Axial 定义轴向渐变。
Axial *AxialShading `json:"axial,omitempty" yaml:"axial,omitempty" toml:"axial,omitempty"`
// Radial 定义径向渐变。
Radial *RadialShading `json:"radial,omitempty" yaml:"radial,omitempty" toml:"radial,omitempty"`
// Gouraud 定义三角网格渐变。
Gouraud *Gouraud `json:"gouraud,omitempty" yaml:"gouraud,omitempty" toml:"gouraud,omitempty"`
// LaGouraud 定义四边形网格渐变。
LaGouraud *LaGouraud `json:"la_gouraud,omitempty" yaml:"la_gouraud,omitempty" toml:"la_gouraud,omitempty"`
// Pattern 定义图案填充。
Pattern *Pattern `json:"pattern,omitempty" yaml:"pattern,omitempty" toml:"pattern,omitempty"`
}
Color 描述颜色及其渐变或图案填充信息。
type ColorSpace ¶
type ColorSpace struct {
// ID 标识颜色空间资源。
ID uint64 `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Type 指定颜色空间类型。
Type string `json:"type,omitempty" yaml:"type,omitempty" toml:"type,omitempty"`
// BitsPerComponent 指定每个颜色分量的位数。
BitsPerComponent int `json:"bits_per_component,omitempty" yaml:"bits_per_component,omitempty" toml:"bits_per_component,omitempty"`
// Palette 定义颜色索引到颜色分量的映射。
Palette []string `json:"palette,omitempty" yaml:"palette,omitempty" toml:"palette,omitempty"`
// ProfileFile 指定颜色配置文件路径。
ProfileFile string `json:"profile_file,omitempty" yaml:"profile_file,omitempty" toml:"profile_file,omitempty"`
// ProfileBase64 提供 Base64 编码的颜色配置数据。
ProfileBase64 string `json:"profile_base64,omitempty" yaml:"profile_base64,omitempty" toml:"profile_base64,omitempty"`
// ProfileName 指定颜色配置文件名称。
ProfileName string `json:"profile_name,omitempty" yaml:"profile_name,omitempty" toml:"profile_name,omitempty"`
}
ColorSpace 描述文档使用的颜色空间资源。
type ColorStop ¶
type ColorStop struct {
// Position 指定颜色在渐变中的位置。省略时不写出,由渲染按首尾补齐。
Position *float64 `json:"position,omitempty" yaml:"position,omitempty" toml:"position,omitempty"`
// Color 指定该位置的颜色。
Color Color `json:"color" yaml:"color,omitempty" toml:"color,omitempty"`
}
ColorStop 描述渐变中的颜色停止点。
type Composite ¶
type Composite struct {
// ID 标识复合图形单元。
ID uint64 `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Width 指定复合图形宽度。
Width float64 `json:"width,omitempty" yaml:"width,omitempty" toml:"width,omitempty"`
// Height 指定复合图形高度。
Height float64 `json:"height,omitempty" yaml:"height,omitempty" toml:"height,omitempty"`
// Thumbnail 指定缩略图资源编号。
Thumbnail uint64 `json:"thumbnail,omitempty" yaml:"thumbnail,omitempty" toml:"thumbnail,omitempty"`
// Substitution 指定替代图形资源编号。
Substitution uint64 `json:"substitution,omitempty" yaml:"substitution,omitempty" toml:"substitution,omitempty"`
// Items 定义复合图形中的图元。
Items []Item `json:"items,omitempty" yaml:"items,omitempty" toml:"items,omitempty"`
}
Composite 描述复合图形单元资源。
type CustomData ¶
type CustomData struct {
// Name 指定自定义数据名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// Value 指定自定义数据值。
Value string `json:"value,omitempty" yaml:"value,omitempty" toml:"value,omitempty"`
}
CustomData 描述文档自定义键值数据。
type CustomTag ¶
type CustomTag struct {
// NameSpace 指定自定义标签命名空间。
NameSpace string `json:"name_space,omitempty" yaml:"name_space,omitempty" toml:"name_space,omitempty"`
// Schema 指定架构文件路径。
Schema string `json:"schema,omitempty" yaml:"schema,omitempty" toml:"schema,omitempty"`
// SchemaBase64 提供 Base64 编码的架构数据。
SchemaBase64 string `json:"schema_base64,omitempty" yaml:"schema_base64,omitempty" toml:"schema_base64,omitempty"`
// SchemaName 指定架构在文档中的名称。
SchemaName string `json:"schema_name,omitempty" yaml:"schema_name,omitempty" toml:"schema_name,omitempty"`
// Data 指定自定义数据文件路径或文本数据。
Data string `json:"data,omitempty" yaml:"data,omitempty" toml:"data,omitempty"`
// DataBase64 提供 Base64 编码的自定义数据。
DataBase64 string `json:"data_base64,omitempty" yaml:"data_base64,omitempty" toml:"data_base64,omitempty"`
// DataName 指定自定义数据在文档中的名称。
DataName string `json:"data_name,omitempty" yaml:"data_name,omitempty" toml:"data_name,omitempty"`
}
CustomTag 描述文档自定义标签及其架构和数据。
type Document ¶
type Document struct {
// ID 标识文档。
ID string `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Title 记录文档标题。
Title string `json:"title,omitempty" yaml:"title,omitempty" toml:"title,omitempty"`
// Author 记录文档作者。
Author string `json:"author,omitempty" yaml:"author,omitempty" toml:"author,omitempty"`
// Subject 记录文档主题。
Subject string `json:"subject,omitempty" yaml:"subject,omitempty" toml:"subject,omitempty"`
// Abstract 记录文档摘要。
Abstract string `json:"abstract,omitempty" yaml:"abstract,omitempty" toml:"abstract,omitempty"`
// Creator 记录创建文档的应用名称。
Creator string `json:"creator,omitempty" yaml:"creator,omitempty" toml:"creator,omitempty"`
// CreatorVersion 记录创建应用的版本。
CreatorVersion string `json:"creator_version,omitempty" yaml:"creator_version,omitempty" toml:"creator_version,omitempty"`
// PageSize 定义默认页面尺寸。
PageSize PageSize `json:"page_size" yaml:"page_size,omitempty" toml:"page_size,omitempty"`
// Actions 定义文档级动作。
Actions []Action `json:"actions,omitempty" yaml:"actions,omitempty" toml:"actions,omitempty"`
// Bookmarks 定义文档书签。
Bookmarks []Bookmark `json:"bookmarks,omitempty" yaml:"bookmarks,omitempty" toml:"bookmarks,omitempty"`
// Attachments 定义文档附件。
Attachments []Attachment `json:"attachments,omitempty" yaml:"attachments,omitempty" toml:"attachments,omitempty"`
// Extensions 定义文档扩展信息。
Extensions []Extension `json:"extensions,omitempty" yaml:"extensions,omitempty" toml:"extensions,omitempty"`
// Versions 定义文档版本记录。
Versions []Version `json:"versions,omitempty" yaml:"versions,omitempty" toml:"versions,omitempty"`
// Annotations 定义按页面组织的批注。
Annotations []AnnotationPage `json:"annotations,omitempty" yaml:"annotations,omitempty" toml:"annotations,omitempty"`
// DocUsage 说明文档用途。
DocUsage string `json:"doc_usage,omitempty" yaml:"doc_usage,omitempty" toml:"doc_usage,omitempty"`
// Keywords 记录文档关键词。
Keywords []string `json:"keywords,omitempty" yaml:"keywords,omitempty" toml:"keywords,omitempty"`
// CustomData 定义文档自定义键值数据。
CustomData []CustomData `json:"custom_data,omitempty" yaml:"custom_data,omitempty" toml:"custom_data,omitempty"`
// Cover 指定封面文件路径。
Cover string `json:"cover,omitempty" yaml:"cover,omitempty" toml:"cover,omitempty"`
// CoverBase64 提供 Base64 编码的封面数据。
CoverBase64 string `json:"cover_base64,omitempty" yaml:"cover_base64,omitempty" toml:"cover_base64,omitempty"`
// CoverName 指定封面在文档中的名称。
CoverName string `json:"cover_name,omitempty" yaml:"cover_name,omitempty" toml:"cover_name,omitempty"`
// DocType 指定 OFD.xml 根节点的 DocType 取值,决定文档遵循的 profile。
// 留空或 "OFD" 为 GB/T 33190—2016 的基础 profile;"OFD-A" 是
// GB/T 42133—2022《信息技术 OFD档案应用指南》规定的档案长期保存 profile,
// "OFD-H" 是 GB/T 48666-2026《电子病历版式文档技术要求》(征求意见稿)
// 规定的电子病历 profile。取值区分大小写,未知取值在生成阶段报错。
DocType string `json:"doc_type,omitempty" yaml:"doc_type,omitempty" toml:"doc_type,omitempty"`
// CreationDate 记录文档创建时间。
CreationDate string `json:"creation_date,omitempty" yaml:"creation_date,omitempty" toml:"creation_date,omitempty"`
// ModDate 记录文档最后修改时间。
ModDate string `json:"mod_date,omitempty" yaml:"mod_date,omitempty" toml:"mod_date,omitempty"`
// Area 定义文档页面区域。
Area *PageArea `json:"area,omitempty" yaml:"area,omitempty" toml:"area,omitempty"`
// DefaultCS 指定文档默认颜色空间编号。
DefaultCS uint64 `json:"default_cs,omitempty" yaml:"default_cs,omitempty" toml:"default_cs,omitempty"`
// Preferences 定义文档查看偏好。
Preferences *Preferences `json:"preferences,omitempty" yaml:"preferences,omitempty" toml:"preferences,omitempty"`
// Permissions 定义文档访问和操作权限。
Permissions *Permissions `json:"permissions,omitempty" yaml:"permissions,omitempty" toml:"permissions,omitempty"`
// Outlines 定义文档大纲。
Outlines []Outline `json:"outlines,omitempty" yaml:"outlines,omitempty" toml:"outlines,omitempty"`
// Signatures 定义文档数字签名。
Signatures []Signature `json:"signatures,omitempty" yaml:"signatures,omitempty" toml:"signatures,omitempty"`
}
Document 描述 OFD 文档及其元数据、资源和页面内容。
type DrawParam ¶
type DrawParam struct {
// Name 指定绘制参数名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// Relative 指定参数相对的坐标或对象。
Relative string `json:"relative,omitempty" yaml:"relative,omitempty" toml:"relative,omitempty"`
// LineWidth 指定线宽。
LineWidth float64 `json:"line_width,omitempty" yaml:"line_width,omitempty" toml:"line_width,omitempty"`
// Join 指定线段连接样式。
Join string `json:"join,omitempty" yaml:"join,omitempty" toml:"join,omitempty"`
// Cap 指定线段端点样式。
Cap string `json:"cap,omitempty" yaml:"cap,omitempty" toml:"cap,omitempty"`
// DashOffset 指定虚线起始偏移量。
DashOffset float64 `json:"dash_offset,omitempty" yaml:"dash_offset,omitempty" toml:"dash_offset,omitempty"`
// DashPattern 指定虚线长度模式。
DashPattern []float64 `json:"dash_pattern,omitempty" yaml:"dash_pattern,omitempty" toml:"dash_pattern,omitempty"`
// MiterLimit 指定斜接长度限制。
MiterLimit float64 `json:"miter_limit,omitempty" yaml:"miter_limit,omitempty" toml:"miter_limit,omitempty"`
// FillColor 指定填充颜色。
FillColor *Color `json:"fill_color,omitempty" yaml:"fill_color,omitempty" toml:"fill_color,omitempty"`
// StrokeColor 指定描边颜色。
StrokeColor *Color `json:"stroke_color,omitempty" yaml:"stroke_color,omitempty" toml:"stroke_color,omitempty"`
}
DrawParam 描述图形绘制参数。
type Extension ¶
type Extension struct {
// AppName 指定扩展信息来源应用名称。
AppName string `json:"app_name,omitempty" yaml:"app_name,omitempty" toml:"app_name,omitempty"`
// Company 指定扩展信息来源公司。
Company string `json:"company,omitempty" yaml:"company,omitempty" toml:"company,omitempty"`
// AppVersion 指定来源应用版本。
AppVersion string `json:"app_version,omitempty" yaml:"app_version,omitempty" toml:"app_version,omitempty"`
// Date 记录扩展信息生成时间。
Date string `json:"date,omitempty" yaml:"date,omitempty" toml:"date,omitempty"`
// RefID 指定扩展信息引用标识。
RefID uint64 `json:"ref_id,omitempty" yaml:"ref_id,omitempty" toml:"ref_id,omitempty"`
// Data 指定扩展数据。
Data string `json:"data,omitempty" yaml:"data,omitempty" toml:"data,omitempty"`
// DataXML 指定扩展 XML 数据。
DataXML string `json:"data_xml,omitempty" yaml:"data_xml,omitempty" toml:"data_xml,omitempty"`
// DataFile 指定扩展数据文件路径。
DataFile string `json:"data_file,omitempty" yaml:"data_file,omitempty" toml:"data_file,omitempty"`
// DataFileBase64 提供 Base64 编码的扩展文件数据。
DataFileBase64 string `json:"data_file_base64,omitempty" yaml:"data_file_base64,omitempty" toml:"data_file_base64,omitempty"`
// DataName 指定扩展数据文件名称。
DataName string `json:"data_name,omitempty" yaml:"data_name,omitempty" toml:"data_name,omitempty"`
// Properties 定义扩展属性。
Properties []ExtensionProperty `json:"properties,omitempty" yaml:"properties,omitempty" toml:"properties,omitempty"`
}
Extension 描述文档扩展信息。
type ExtensionProperty ¶
type ExtensionProperty struct {
// Name 指定属性名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// Type 指定属性类型。
Type string `json:"type,omitempty" yaml:"type,omitempty" toml:"type,omitempty"`
// Value 指定属性值。
Value string `json:"value,omitempty" yaml:"value,omitempty" toml:"value,omitempty"`
}
ExtensionProperty 描述扩展信息的属性。
type FieldDoc ¶ added in v0.1.5
type FieldDoc struct {
// Name 是相对所属结构体的键名,也是 manifest 里的字段名。
Name string
// Type 是该字段的 Go 类型,数组和指针保留书写形式。
Type string
// Doc 是去掉字段名前缀后的字段说明。
Doc string
// Optional 表示该字段的 json tag 带 omitempty,未设置时零值即不输出。
Optional bool
}
FieldDoc 是单个 manifest 字段的参考信息。
type Font ¶
type Font struct {
// Name 指定字体资源名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// FamilyName 指定字体族名称。
FamilyName string `json:"family_name,omitempty" yaml:"family_name,omitempty" toml:"family_name,omitempty"`
// Charset 指定字体字符集。
Charset string `json:"charset,omitempty" yaml:"charset,omitempty" toml:"charset,omitempty"`
// Format 指定字体文件格式。
Format string `json:"format,omitempty" yaml:"format,omitempty" toml:"format,omitempty"`
// File 指定字体文件路径。
File string `json:"file,omitempty" yaml:"file,omitempty" toml:"file,omitempty"`
// DataBase64 提供 Base64 编码的字体数据。
DataBase64 string `json:"data_base64,omitempty" yaml:"data_base64,omitempty" toml:"data_base64,omitempty"`
// Italic 指示字体是否为斜体。
Italic bool `json:"italic,omitempty" yaml:"italic,omitempty" toml:"italic,omitempty"`
// Bold 指示字体是否为粗体。
Bold bool `json:"bold,omitempty" yaml:"bold,omitempty" toml:"bold,omitempty"`
// Serif 指示字体是否为衬线字体。
Serif bool `json:"serif,omitempty" yaml:"serif,omitempty" toml:"serif,omitempty"`
// FixedWidth 指示字体是否为等宽字体。
FixedWidth bool `json:"fixed_width,omitempty" yaml:"fixed_width,omitempty" toml:"fixed_width,omitempty"`
}
Font 描述文档使用的字体资源。
type GotoAAction ¶
type GotoAAction struct {
// AttachID 指定跳转目标附件标识。
AttachID string `json:"attach_id,omitempty" yaml:"attach_id,omitempty" toml:"attach_id,omitempty"`
// NewWindow 指示是否在新窗口打开附件。
NewWindow *bool `json:"new_window,omitempty" yaml:"new_window,omitempty" toml:"new_window,omitempty"`
}
GotoAAction 描述跳转到附件的动作。
type GotoAction ¶
type GotoAction struct {
// Page 指定跳转目标页码。
Page int `json:"page,omitempty" yaml:"page,omitempty" toml:"page,omitempty"`
// Type 指定跳转目标类型。
Type string `json:"type,omitempty" yaml:"type,omitempty" toml:"type,omitempty"`
// Bookmark 指定跳转目标书签名称。
Bookmark string `json:"bookmark,omitempty" yaml:"bookmark,omitempty" toml:"bookmark,omitempty"`
// Left 指定目标视图左边界。
Left *float64 `json:"left,omitempty" yaml:"left,omitempty" toml:"left,omitempty"`
// Top 指定目标视图上边界。
Top *float64 `json:"top,omitempty" yaml:"top,omitempty" toml:"top,omitempty"`
// Right 指定目标视图右边界。
Right *float64 `json:"right,omitempty" yaml:"right,omitempty" toml:"right,omitempty"`
// Bottom 指定目标视图下边界。
Bottom *float64 `json:"bottom,omitempty" yaml:"bottom,omitempty" toml:"bottom,omitempty"`
// Zoom 指定目标视图缩放比例。
Zoom *float64 `json:"zoom,omitempty" yaml:"zoom,omitempty" toml:"zoom,omitempty"`
}
GotoAction 描述跳转到页面、书签或页面位置的动作。
type Gouraud ¶
type Gouraud struct {
// Extend 指定渐变边界的延伸方式。
Extend int `json:"extend,omitempty" yaml:"extend,omitempty" toml:"extend,omitempty"`
// Points 定义三角网格顶点。
Points []GouraudPoint `json:"points,omitempty" yaml:"points,omitempty" toml:"points,omitempty"`
// BackColor 指定网格背景颜色。
BackColor *Color `json:"back_color,omitempty" yaml:"back_color,omitempty" toml:"back_color,omitempty"`
}
Gouraud 描述 Gouraud 三角网格渐变。
type GouraudPoint ¶
type GouraudPoint struct {
// X 指定顶点横坐标。
X float64 `json:"x,omitempty" yaml:"x,omitempty" toml:"x,omitempty"`
// Y 指定顶点纵坐标。
Y float64 `json:"y,omitempty" yaml:"y,omitempty" toml:"y,omitempty"`
// EdgeFlag 指定顶点边标志。
EdgeFlag int `json:"edge_flag,omitempty" yaml:"edge_flag,omitempty" toml:"edge_flag,omitempty"`
// Color 指定顶点颜色。
Color Color `json:"color,omitempty" yaml:"color,omitempty" toml:"color,omitempty"`
}
GouraudPoint 描述 Gouraud 渐变网格中的顶点。
type Image ¶
type Image struct {
// ID 标识图像资源。
ID uint64 `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Format 指定图像格式。
Format string `json:"format,omitempty" yaml:"format,omitempty" toml:"format,omitempty"`
// Name 指定图像名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// File 指定图像文件路径。
File string `json:"file,omitempty" yaml:"file,omitempty" toml:"file,omitempty"`
// DataBase64 提供 Base64 编码的图像数据。
DataBase64 string `json:"data_base64,omitempty" yaml:"data_base64,omitempty" toml:"data_base64,omitempty"`
}
Image 描述文档中的图像资源。
type ImageBorder ¶
type ImageBorder struct {
// LineWidth 指定图像边框线宽。
LineWidth float64 `json:"line_width,omitempty" yaml:"line_width,omitempty" toml:"line_width,omitempty"`
// HorizontalRadius 指定边框水平圆角半径。
HorizontalRadius float64 `json:"horizontal_radius,omitempty" yaml:"horizontal_radius,omitempty" toml:"horizontal_radius,omitempty"`
// VerticalRadius 指定边框垂直圆角半径。
VerticalRadius float64 `json:"vertical_radius,omitempty" yaml:"vertical_radius,omitempty" toml:"vertical_radius,omitempty"`
// DashOffset 指定边框虚线起始偏移量。
DashOffset float64 `json:"dash_offset,omitempty" yaml:"dash_offset,omitempty" toml:"dash_offset,omitempty"`
// DashPattern 指定边框虚线长度模式。
DashPattern []float64 `json:"dash_pattern,omitempty" yaml:"dash_pattern,omitempty" toml:"dash_pattern,omitempty"`
// Color 指定边框颜色。
Color *Color `json:"color,omitempty" yaml:"color,omitempty" toml:"color,omitempty"`
}
ImageBorder 描述图像边框的绘制样式。
type Item ¶
type Item struct {
// Type 指定图元类型。
Type string `json:"type,omitempty" yaml:"type,omitempty" toml:"type,omitempty"`
// X 指定图元左上角横坐标。
X float64 `json:"x,omitempty" yaml:"x,omitempty" toml:"x,omitempty"`
// Y 指定图元左上角纵坐标。
Y float64 `json:"y,omitempty" yaml:"y,omitempty" toml:"y,omitempty"`
// Width 指定图元宽度。
Width float64 `json:"width,omitempty" yaml:"width,omitempty" toml:"width,omitempty"`
// Height 指定图元高度。
Height float64 `json:"height,omitempty" yaml:"height,omitempty" toml:"height,omitempty"`
// Value 指定图元文本或其他值。
Value string `json:"value,omitempty" yaml:"value,omitempty" toml:"value,omitempty"`
// Font 指定文本图元使用的字体名称。
Font string `json:"font,omitempty" yaml:"font,omitempty" toml:"font,omitempty"`
// Size 指定文本字号。
Size float64 `json:"size,omitempty" yaml:"size,omitempty" toml:"size,omitempty"`
// Data 指定图元数据或文件路径。
Data string `json:"data,omitempty" yaml:"data,omitempty" toml:"data,omitempty"`
// DataBase64 提供 Base64 编码的图元数据。
DataBase64 string `json:"data_base64,omitempty" yaml:"data_base64,omitempty" toml:"data_base64,omitempty"`
// Format 指定图元数据格式。
Format string `json:"format,omitempty" yaml:"format,omitempty" toml:"format,omitempty"`
// Name 指定图元名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// Visible 指示图元是否可见。
Visible *bool `json:"visible,omitempty" yaml:"visible,omitempty" toml:"visible,omitempty"`
// ResourceID 指定图元引用的资源编号。
ResourceID uint64 `json:"resource_id,omitempty" yaml:"resource_id,omitempty" toml:"resource_id,omitempty"`
// Stroke 指示是否绘制轮廓线。
Stroke bool `json:"stroke,omitempty" yaml:"stroke,omitempty" toml:"stroke,omitempty"`
// Fill 指示是否填充图元。
Fill *bool `json:"fill,omitempty" yaml:"fill,omitempty" toml:"fill,omitempty"`
// StrokeSet 指示是否显式设置描边属性。
StrokeSet *bool `json:"stroke_set,omitempty" yaml:"stroke_set,omitempty" toml:"stroke_set,omitempty"`
// Rule 指定填充规则。
Rule string `json:"rule,omitempty" yaml:"rule,omitempty" toml:"rule,omitempty"`
// LineWidth 指定描边线宽。
LineWidth float64 `json:"line_width,omitempty" yaml:"line_width,omitempty" toml:"line_width,omitempty"`
// Cap 指定描边端点样式。
Cap string `json:"cap,omitempty" yaml:"cap,omitempty" toml:"cap,omitempty"`
// Join 指定描边连接样式。
Join string `json:"join,omitempty" yaml:"join,omitempty" toml:"join,omitempty"`
// MiterLimit 指定斜接长度限制。
MiterLimit float64 `json:"miter_limit,omitempty" yaml:"miter_limit,omitempty" toml:"miter_limit,omitempty"`
// DashOffset 指定虚线起始偏移量。
DashOffset float64 `json:"dash_offset,omitempty" yaml:"dash_offset,omitempty" toml:"dash_offset,omitempty"`
// DashPattern 指定虚线长度模式。
DashPattern []float64 `json:"dash_pattern,omitempty" yaml:"dash_pattern,omitempty" toml:"dash_pattern,omitempty"`
// Alpha 指定图元透明度。
Alpha *uint8 `json:"alpha,omitempty" yaml:"alpha,omitempty" toml:"alpha,omitempty"`
// DrawParam 指定图元使用的绘制参数名称。
DrawParam string `json:"draw_param,omitempty" yaml:"draw_param,omitempty" toml:"draw_param,omitempty"`
// CTM 指定图元的坐标变换矩阵。
CTM []float64 `json:"ctm,omitempty" yaml:"ctm,omitempty" toml:"ctm,omitempty"`
// FillColor 指定填充颜色。
FillColor *Color `json:"fill_color,omitempty" yaml:"fill_color,omitempty" toml:"fill_color,omitempty"`
// StrokeColor 指定描边颜色。
StrokeColor *Color `json:"stroke_color,omitempty" yaml:"stroke_color,omitempty" toml:"stroke_color,omitempty"`
// TextCodes 定义文本代码及其定位信息。
TextCodes []TextCode `json:"text_codes,omitempty" yaml:"text_codes,omitempty" toml:"text_codes,omitempty"`
// CGTransforms 定义文本代码到字形的映射。
CGTransforms []CGTransform `json:"cg_transforms,omitempty" yaml:"cg_transforms,omitempty" toml:"cg_transforms,omitempty"`
// Actions 定义图元触发的动作。
Actions []Action `json:"actions,omitempty" yaml:"actions,omitempty" toml:"actions,omitempty"`
// Items 定义复合或页面块图元的子图元。
Items []Item `json:"items,omitempty" yaml:"items,omitempty" toml:"items,omitempty"`
// HScale 指定文本水平方向缩放比例。
HScale float64 `json:"h_scale,omitempty" yaml:"h_scale,omitempty" toml:"h_scale,omitempty"`
// ReadDirection 指定文本阅读方向。
ReadDirection int `json:"read_direction,omitempty" yaml:"read_direction,omitempty" toml:"read_direction,omitempty"`
// CharDirection 指定字符排列方向。
CharDirection int `json:"char_direction,omitempty" yaml:"char_direction,omitempty" toml:"char_direction,omitempty"`
// Weight 指定文本字重。
Weight int `json:"weight,omitempty" yaml:"weight,omitempty" toml:"weight,omitempty"`
// Italic 指示文本是否为斜体。
Italic bool `json:"italic,omitempty" yaml:"italic,omitempty" toml:"italic,omitempty"`
// Clips 定义图元裁剪区域。
Clips []Clip `json:"clips,omitempty" yaml:"clips,omitempty" toml:"clips,omitempty"`
// Substitution 指定图像替代资源编号。
Substitution uint64 `json:"substitution,omitempty" yaml:"substitution,omitempty" toml:"substitution,omitempty"`
// ImageMask 指定图像掩码资源编号。
ImageMask uint64 `json:"image_mask,omitempty" yaml:"image_mask,omitempty" toml:"image_mask,omitempty"`
// Border 定义图像边框样式。
Border *ImageBorder `json:"border,omitempty" yaml:"border,omitempty" toml:"border,omitempty"`
// Rows 定义表格行(仅当 type 为 "table" 时有效)。
Rows []TableRow `json:"rows,omitempty" yaml:"rows,omitempty" toml:"rows,omitempty"`
// ColumnWidths 定义各列宽度(仅当 type 为 "table" 时有效)。
ColumnWidths []float64 `json:"column_widths,omitempty" yaml:"column_widths,omitempty" toml:"column_widths,omitempty"`
// HeaderRows 定义表头行数(仅当 type 为 "table" 时有效)。
HeaderRows int `json:"header_rows,omitempty" yaml:"header_rows,omitempty" toml:"header_rows,omitempty"`
// Style 定义表格样式(仅当 type 为 "table" 时有效)。
Style *TableStyle `json:"style,omitempty" yaml:"style,omitempty" toml:"style,omitempty"`
// Caption 定义表题文字(仅当 type 为 "table" 时有效)。
Caption string `json:"caption,omitempty" yaml:"caption,omitempty" toml:"caption,omitempty"`
// CaptionStyle 定义表题样式(仅当 type 为 "table" 时有效)。
CaptionStyle *CaptionStyle `json:"caption_style,omitempty" yaml:"caption_style,omitempty" toml:"caption_style,omitempty"`
// ContinuationCaption 定义续表题文字(仅当 type 为 "table" 时有效)。
ContinuationCaption string `json:"continuation_caption,omitempty" yaml:"continuation_caption,omitempty" toml:"continuation_caption,omitempty"`
// ContinuationCaptionStyle 定义续表题样式(仅当 type 为 "table" 时有效)。
ContinuationCaptionStyle *CaptionStyle `` /* 131-byte string literal not displayed */
// Align 指定图片与说明文字共用的水平对齐(仅当 type 为 "figure" 时有效)。
Align string `json:"align,omitempty" yaml:"align,omitempty" toml:"align,omitempty"`
// ImageWidth 定义图片宽度(仅当 type 为 "figure" 时有效)。
ImageWidth float64 `json:"image_width,omitempty" yaml:"image_width,omitempty" toml:"image_width,omitempty"`
// ImageFillWidth 指示 image_width 是否按图块宽度的比例解释(仅当 type 为 "figure" 时有效)。
ImageFillWidth bool `json:"image_fill_width,omitempty" yaml:"image_fill_width,omitempty" toml:"image_fill_width,omitempty"`
// ImageHeight 定义图片高度(仅当 type 为 "figure" 时有效)。
ImageHeight float64 `json:"image_height,omitempty" yaml:"image_height,omitempty" toml:"image_height,omitempty"`
// Fit 指定图片在给定尺寸内的适配方式:contain 保持比例,stretch 拉伸(仅当 type 为 "figure" 时有效)。
Fit string `json:"fit,omitempty" yaml:"fit,omitempty" toml:"fit,omitempty"`
}
Item 描述页面、模板或复合图形中的图元。
type LaGouraud ¶
type LaGouraud struct {
// VerticesPerRow 指定每行顶点数。
VerticesPerRow int `json:"vertices_per_row,omitempty" yaml:"vertices_per_row,omitempty" toml:"vertices_per_row,omitempty"`
// Extend 指定渐变边界的延伸方式。
Extend int `json:"extend,omitempty" yaml:"extend,omitempty" toml:"extend,omitempty"`
// Points 定义四边形网格顶点。
Points []LaGouraudPoint `json:"points,omitempty" yaml:"points,omitempty" toml:"points,omitempty"`
// BackColor 指定网格背景颜色。
BackColor *Color `json:"back_color,omitempty" yaml:"back_color,omitempty" toml:"back_color,omitempty"`
}
LaGouraud 描述 LaGouraud 四边形网格渐变。
type LaGouraudPoint ¶
type LaGouraudPoint struct {
// X 指定顶点横坐标。
X float64 `json:"x,omitempty" yaml:"x,omitempty" toml:"x,omitempty"`
// Y 指定顶点纵坐标。
Y float64 `json:"y,omitempty" yaml:"y,omitempty" toml:"y,omitempty"`
// Color 指定顶点颜色。
Color Color `json:"color,omitempty" yaml:"color,omitempty" toml:"color,omitempty"`
}
LaGouraudPoint 描述 LaGouraud 渐变网格中的顶点。
type Layer ¶
type Layer struct {
// Type 指定图层类型。
Type string `json:"type,omitempty" yaml:"type,omitempty" toml:"type,omitempty"`
// DrawParam 指定图层使用的绘制参数名称。
DrawParam string `json:"draw_param,omitempty" yaml:"draw_param,omitempty" toml:"draw_param,omitempty"`
// Items 定义图层中的图元。
Items []Item `json:"items,omitempty" yaml:"items,omitempty" toml:"items,omitempty"`
}
Layer 描述页面或模板中的图层。
type Manifest ¶
type Manifest struct {
// Version 指定 manifest 格式版本。
Version int `json:"version,omitempty" yaml:"version,omitempty" toml:"version,omitempty"`
// Document 定义文档主体及其元数据。
Document Document `json:"document" yaml:"document,omitempty" toml:"document,omitempty"`
// Resources 汇总文档级资源。
Resources Resources `json:"resources" yaml:"resources,omitempty" toml:"resources,omitempty"`
// Templates 定义可供页面引用的模板页。
Templates []Template `json:"templates,omitempty" yaml:"templates,omitempty" toml:"templates,omitempty"`
// Pages 定义文档页面。
Pages []Page `json:"pages,omitempty" yaml:"pages,omitempty" toml:"pages,omitempty"`
}
Manifest 是 ofd-creator 支持的声明式输入文件。
func (Manifest) BuildWithOptions ¶ added in v0.1.3
type Media ¶
type Media struct {
// ID 标识媒体资源。
ID uint64 `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Type 指定媒体类型。
Type string `json:"type,omitempty" yaml:"type,omitempty" toml:"type,omitempty"`
// Format 指定媒体格式。
Format string `json:"format,omitempty" yaml:"format,omitempty" toml:"format,omitempty"`
// Name 指定媒体名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// File 指定媒体文件路径。
File string `json:"file,omitempty" yaml:"file,omitempty" toml:"file,omitempty"`
// DataBase64 提供 Base64 编码的媒体数据。
DataBase64 string `json:"data_base64,omitempty" yaml:"data_base64,omitempty" toml:"data_base64,omitempty"`
}
Media 描述文档中的媒体资源。
type MovieAction ¶
type MovieAction struct {
// ResourceID 指定媒体资源编号。
ResourceID uint64 `json:"resource_id,omitempty" yaml:"resource_id,omitempty" toml:"resource_id,omitempty"`
// Operator 指定媒体操作类型。
Operator string `json:"operator,omitempty" yaml:"operator,omitempty" toml:"operator,omitempty"`
}
MovieAction 描述播放媒体资源的动作。
type Outline ¶
type Outline struct {
// Title 指定大纲节点标题。
Title string `json:"title,omitempty" yaml:"title,omitempty" toml:"title,omitempty"`
// Count 指定大纲节点包含的条目数。
Count *int `json:"count,omitempty" yaml:"count,omitempty" toml:"count,omitempty"`
// Expanded 指示大纲节点是否展开。
Expanded *bool `json:"expanded,omitempty" yaml:"expanded,omitempty" toml:"expanded,omitempty"`
// Actions 定义大纲节点动作。
Actions []Action `json:"actions,omitempty" yaml:"actions,omitempty" toml:"actions,omitempty"`
// Children 定义大纲子节点。
Children []Outline `json:"children,omitempty" yaml:"children,omitempty" toml:"children,omitempty"`
}
Outline 描述文档大纲节点及其子节点。
type Page ¶
type Page struct {
// Templates 指定页面引用的模板页。
Templates []TemplateRef `json:"templates,omitempty" yaml:"templates,omitempty" toml:"templates,omitempty"`
// Layers 定义页面图层。
Layers []Layer `json:"layers,omitempty" yaml:"layers,omitempty" toml:"layers,omitempty"`
// Items 定义页面图元。
Items []Item `json:"items,omitempty" yaml:"items,omitempty" toml:"items,omitempty"`
// Area 定义页面区域。
Area *PageArea `json:"area,omitempty" yaml:"area,omitempty" toml:"area,omitempty"`
// LayerType 指定页面图层类型。
LayerType string `json:"layer_type,omitempty" yaml:"layer_type,omitempty" toml:"layer_type,omitempty"`
// Actions 定义页面级动作。
Actions []Action `json:"actions,omitempty" yaml:"actions,omitempty" toml:"actions,omitempty"`
// Resources 定义页面级资源。
Resources []PageResource `json:"resources,omitempty" yaml:"resources,omitempty" toml:"resources,omitempty"`
}
Page 描述文档页面及其图层、图元和页面资源。
type PageArea ¶
type PageArea struct {
// PhysicalBox 定义页面物理区域。
PhysicalBox *Box `json:"physical_box,omitempty" yaml:"physical_box,omitempty" toml:"physical_box,omitempty"`
// ApplicationBox 定义页面应用区域。
ApplicationBox *Box `json:"application_box,omitempty" yaml:"application_box,omitempty" toml:"application_box,omitempty"`
// ContentBox 定义页面内容区域。
ContentBox *Box `json:"content_box,omitempty" yaml:"content_box,omitempty" toml:"content_box,omitempty"`
// BleedBox 定义页面出血区域。
BleedBox *Box `json:"bleed_box,omitempty" yaml:"bleed_box,omitempty" toml:"bleed_box,omitempty"`
}
PageArea 描述页面的物理、应用、内容和出血区域。
type PageImage ¶
type PageImage struct {
// ID 标识页面图像资源。
ID uint64 `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Format 指定图像格式。
Format string `json:"format,omitempty" yaml:"format,omitempty" toml:"format,omitempty"`
// Name 指定图像名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// File 指定图像文件路径。
File string `json:"file,omitempty" yaml:"file,omitempty" toml:"file,omitempty"`
// DataBase64 提供 Base64 编码的图像数据。
DataBase64 string `json:"data_base64,omitempty" yaml:"data_base64,omitempty" toml:"data_base64,omitempty"`
}
PageImage 描述页面资源中的图像。
type PageResource ¶
type PageResource struct {
// File 指定页面资源文件路径。
File string `json:"file,omitempty" yaml:"file,omitempty" toml:"file,omitempty"`
// DataBase64 提供 Base64 编码的页面资源数据。
DataBase64 string `json:"data_base64,omitempty" yaml:"data_base64,omitempty" toml:"data_base64,omitempty"`
// Images 定义资源中的图像。
Images []PageImage `json:"images,omitempty" yaml:"images,omitempty" toml:"images,omitempty"`
// Files 定义页面资源包中的文件。
Files []ResourceFile `json:"files,omitempty" yaml:"files,omitempty" toml:"files,omitempty"`
}
PageResource 描述页面级资源文件或嵌入式图像。
type PageSize ¶
type PageSize struct {
// Name 指定预定义页面尺寸名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// Width 指定页面宽度。
Width float64 `json:"width,omitempty" yaml:"width,omitempty" toml:"width,omitempty"`
// Height 指定页面高度。
Height float64 `json:"height,omitempty" yaml:"height,omitempty" toml:"height,omitempty"`
}
PageSize 描述文档页面尺寸。
type Pattern ¶
type Pattern struct {
// Width 指定图案单元宽度。
Width float64 `json:"width,omitempty" yaml:"width,omitempty" toml:"width,omitempty"`
// Height 指定图案单元高度。
Height float64 `json:"height,omitempty" yaml:"height,omitempty" toml:"height,omitempty"`
// XStep 指定图案在横向的重复步长。
XStep float64 `json:"x_step,omitempty" yaml:"x_step,omitempty" toml:"x_step,omitempty"`
// YStep 指定图案在纵向的重复步长。
YStep float64 `json:"y_step,omitempty" yaml:"y_step,omitempty" toml:"y_step,omitempty"`
// ReflectMethod 指定图案反射方式。
ReflectMethod string `json:"reflect_method,omitempty" yaml:"reflect_method,omitempty" toml:"reflect_method,omitempty"`
// RelativeTo 指定图案定位所依据的对象。
RelativeTo string `json:"relative_to,omitempty" yaml:"relative_to,omitempty" toml:"relative_to,omitempty"`
// CTM 指定图案的坐标变换矩阵。
CTM []float64 `json:"ctm,omitempty" yaml:"ctm,omitempty" toml:"ctm,omitempty"`
// Thumbnail 指定图案缩略图资源编号。
Thumbnail uint64 `json:"thumbnail,omitempty" yaml:"thumbnail,omitempty" toml:"thumbnail,omitempty"`
// Items 定义图案中的图元。
Items []Item `json:"items,omitempty" yaml:"items,omitempty" toml:"items,omitempty"`
// Layers 定义图案中的图层。
Layers []Layer `json:"layers,omitempty" yaml:"layers,omitempty" toml:"layers,omitempty"`
}
Pattern 描述图案填充及其内容。
type Permissions ¶
type Permissions struct {
// Edit 指示是否允许编辑文档。
Edit *bool `json:"edit,omitempty" yaml:"edit,omitempty" toml:"edit,omitempty"`
// Annot 指示是否允许添加或修改批注。
Annot *bool `json:"annot,omitempty" yaml:"annot,omitempty" toml:"annot,omitempty"`
// Export 指示是否允许导出文档。
Export *bool `json:"export,omitempty" yaml:"export,omitempty" toml:"export,omitempty"`
// Signature 指示是否允许签名。
Signature *bool `json:"signature,omitempty" yaml:"signature,omitempty" toml:"signature,omitempty"`
// Watermark 指示是否允许修改水印。
Watermark *bool `json:"watermark,omitempty" yaml:"watermark,omitempty" toml:"watermark,omitempty"`
// PrintScreen 指示是否允许屏幕截图。
PrintScreen *bool `json:"print_screen,omitempty" yaml:"print_screen,omitempty" toml:"print_screen,omitempty"`
// Print 定义打印权限和设置。
Print *PrintSettings `json:"print,omitempty" yaml:"print,omitempty" toml:"print,omitempty"`
// ValidPeriod 定义权限的有效时间范围。
ValidPeriod *ValidPeriod `json:"valid_period,omitempty" yaml:"valid_period,omitempty" toml:"valid_period,omitempty"`
}
Permissions 描述文档的访问和操作权限。
type Point ¶
type Point struct {
// X 指定横坐标。
X float64 `json:"x,omitempty" yaml:"x,omitempty" toml:"x,omitempty"`
// Y 指定纵坐标。
Y float64 `json:"y,omitempty" yaml:"y,omitempty" toml:"y,omitempty"`
}
Point 描述二维坐标点。
type Preferences ¶
type Preferences struct {
// PageMode 指定页面显示模式。
PageMode string `json:"page_mode,omitempty" yaml:"page_mode,omitempty" toml:"page_mode,omitempty"`
// PageLayout 指定页面布局方式。
PageLayout string `json:"page_layout,omitempty" yaml:"page_layout,omitempty" toml:"page_layout,omitempty"`
// TabDisplay 指定文档标签页显示方式。
TabDisplay string `json:"tab_display,omitempty" yaml:"tab_display,omitempty" toml:"tab_display,omitempty"`
// HideToolbar 指示是否隐藏工具栏。
HideToolbar *bool `json:"hide_toolbar,omitempty" yaml:"hide_toolbar,omitempty" toml:"hide_toolbar,omitempty"`
// HideMenubar 指示是否隐藏菜单栏。
HideMenubar *bool `json:"hide_menubar,omitempty" yaml:"hide_menubar,omitempty" toml:"hide_menubar,omitempty"`
// HideWindowUI 指示是否隐藏窗口界面元素。
HideWindowUI *bool `json:"hide_window_ui,omitempty" yaml:"hide_window_ui,omitempty" toml:"hide_window_ui,omitempty"`
// ZoomMode 指定缩放模式。
ZoomMode string `json:"zoom_mode,omitempty" yaml:"zoom_mode,omitempty" toml:"zoom_mode,omitempty"`
// Zoom 指定页面缩放比例。
Zoom *float64 `json:"zoom,omitempty" yaml:"zoom,omitempty" toml:"zoom,omitempty"`
}
Preferences 描述文档查看偏好设置。
type PrintSettings ¶
type PrintSettings struct {
// Printable 指示是否允许打印。
Printable bool `json:"printable,omitempty" yaml:"printable,omitempty" toml:"printable,omitempty"`
// Copies 指定允许或默认的打印份数。
Copies *int `json:"copies,omitempty" yaml:"copies,omitempty" toml:"copies,omitempty"`
}
PrintSettings 描述文档打印设置。
type PublicResource ¶
type PublicResource struct {
// Name 指定公共资源名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// File 指定公共资源文件路径。
File string `json:"file,omitempty" yaml:"file,omitempty" toml:"file,omitempty"`
// DataBase64 提供 Base64 编码的公共资源数据。
DataBase64 string `json:"data_base64,omitempty" yaml:"data_base64,omitempty" toml:"data_base64,omitempty"`
// Files 定义公共资源包中的文件。
Files []ResourceFile `json:"files,omitempty" yaml:"files,omitempty" toml:"files,omitempty"`
}
PublicResource 描述文档中的公共资源。
type RadialShading ¶
type RadialShading struct {
// MapType 指定渐变映射类型。
MapType string `json:"map_type,omitempty" yaml:"map_type,omitempty" toml:"map_type,omitempty"`
// MapUnit 指定渐变映射单位。
MapUnit float64 `json:"map_unit,omitempty" yaml:"map_unit,omitempty" toml:"map_unit,omitempty"`
// Eccentricity 指定径向渐变椭圆离心率。
Eccentricity float64 `json:"eccentricity,omitempty" yaml:"eccentricity,omitempty" toml:"eccentricity,omitempty"`
// Angle 指定径向渐变旋转角度。
Angle float64 `json:"angle,omitempty" yaml:"angle,omitempty" toml:"angle,omitempty"`
// StartPoint 指定渐变起点圆心。
StartPoint string `json:"start_point,omitempty" yaml:"start_point,omitempty" toml:"start_point,omitempty"`
// StartRadius 指定渐变起始半径。
StartRadius float64 `json:"start_radius,omitempty" yaml:"start_radius,omitempty" toml:"start_radius,omitempty"`
// EndPoint 指定渐变终点圆心。
EndPoint string `json:"end_point,omitempty" yaml:"end_point,omitempty" toml:"end_point,omitempty"`
// EndRadius 指定渐变结束半径。
EndRadius float64 `json:"end_radius,omitempty" yaml:"end_radius,omitempty" toml:"end_radius,omitempty"`
// Extend 指定渐变端点的延伸方式。
Extend int `json:"extend,omitempty" yaml:"extend,omitempty" toml:"extend,omitempty"`
// Segments 定义渐变颜色停止点。
Segments []ColorStop `json:"segments,omitempty" yaml:"segments,omitempty" toml:"segments,omitempty"`
}
RadialShading 描述径向渐变。
type RegionCommand ¶
type RegionCommand struct {
// Type 指定路径命令类型。
Type string `json:"type,omitempty" yaml:"type,omitempty" toml:"type,omitempty"`
// X 指定命令终点横坐标。
X float64 `json:"x,omitempty" yaml:"x,omitempty" toml:"x,omitempty"`
// Y 指定命令终点纵坐标。
Y float64 `json:"y,omitempty" yaml:"y,omitempty" toml:"y,omitempty"`
// ControlX 指定二次贝塞尔曲线控制点横坐标。
ControlX float64 `json:"control_x,omitempty" yaml:"control_x,omitempty" toml:"control_x,omitempty"`
// ControlY 指定二次贝塞尔曲线控制点纵坐标。
ControlY float64 `json:"control_y,omitempty" yaml:"control_y,omitempty" toml:"control_y,omitempty"`
// Control1X 指定三次贝塞尔曲线第一个控制点横坐标。
Control1X float64 `json:"control_1_x,omitempty" yaml:"control_1_x,omitempty" toml:"control_1_x,omitempty"`
// Control1Y 指定三次贝塞尔曲线第一个控制点纵坐标。
Control1Y float64 `json:"control_1_y,omitempty" yaml:"control_1_y,omitempty" toml:"control_1_y,omitempty"`
// Control2X 指定三次贝塞尔曲线第二个控制点横坐标。
Control2X float64 `json:"control_2_x,omitempty" yaml:"control_2_x,omitempty" toml:"control_2_x,omitempty"`
// Control2Y 指定三次贝塞尔曲线第二个控制点纵坐标。
Control2Y float64 `json:"control_2_y,omitempty" yaml:"control_2_y,omitempty" toml:"control_2_y,omitempty"`
// SweepDirection 指定椭圆弧的扫描方向。
SweepDirection bool `json:"sweep_direction,omitempty" yaml:"sweep_direction,omitempty" toml:"sweep_direction,omitempty"`
// LargeArc 指示椭圆弧是否取大弧段。
LargeArc bool `json:"large_arc,omitempty" yaml:"large_arc,omitempty" toml:"large_arc,omitempty"`
// RotationAngle 指定椭圆弧旋转角度。
RotationAngle float64 `json:"rotation_angle,omitempty" yaml:"rotation_angle,omitempty" toml:"rotation_angle,omitempty"`
// EllipseWidth 指定椭圆弧椭圆宽度。
EllipseWidth float64 `json:"ellipse_width,omitempty" yaml:"ellipse_width,omitempty" toml:"ellipse_width,omitempty"`
// EllipseHeight 指定椭圆弧椭圆高度。
EllipseHeight float64 `json:"ellipse_height,omitempty" yaml:"ellipse_height,omitempty" toml:"ellipse_height,omitempty"`
}
RegionCommand 描述动作区域路径中的绘制命令。
type ResourceFile ¶
type ResourceFile struct {
// Path 指定文件在资源包中的路径。
Path string `json:"path,omitempty" yaml:"path,omitempty" toml:"path,omitempty"`
// File 指定源文件路径。
File string `json:"file,omitempty" yaml:"file,omitempty" toml:"file,omitempty"`
// DataBase64 提供 Base64 编码的文件数据。
DataBase64 string `json:"data_base64,omitempty" yaml:"data_base64,omitempty" toml:"data_base64,omitempty"`
}
ResourceFile 描述资源包中的文件。
type Resources ¶
type Resources struct {
// Fonts 汇总字体资源。
Fonts []Font `json:"fonts,omitempty" yaml:"fonts,omitempty" toml:"fonts,omitempty"`
// Images 汇总图像资源。
Images []Image `json:"images,omitempty" yaml:"images,omitempty" toml:"images,omitempty"`
// Media 汇总媒体资源。
Media []Media `json:"media,omitempty" yaml:"media,omitempty" toml:"media,omitempty"`
// ColorSpaces 汇总颜色空间资源。
ColorSpaces []ColorSpace `json:"color_spaces,omitempty" yaml:"color_spaces,omitempty" toml:"color_spaces,omitempty"`
// DrawParams 汇总图形绘制参数。
DrawParams []DrawParam `json:"draw_params,omitempty" yaml:"draw_params,omitempty" toml:"draw_params,omitempty"`
// Composites 汇总复合图形单元资源。
Composites []Composite `json:"composites,omitempty" yaml:"composites,omitempty" toml:"composites,omitempty"`
// Public 汇总公共资源。
Public []PublicResource `json:"public,omitempty" yaml:"public,omitempty" toml:"public,omitempty"`
// CustomTags 汇总自定义标签资源。
CustomTags []CustomTag `json:"custom_tags,omitempty" yaml:"custom_tags,omitempty" toml:"custom_tags,omitempty"`
}
Resources 汇总文档级资源。
type Signature ¶
type Signature struct {
// ID 标识数字签名。
ID string `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Type 指定签名类型。
Type string `json:"type,omitempty" yaml:"type,omitempty" toml:"type,omitempty"`
// ProviderName 指定签名提供方名称。
ProviderName string `json:"provider_name,omitempty" yaml:"provider_name,omitempty" toml:"provider_name,omitempty"`
// ProviderVersion 指定签名提供方版本。
ProviderVersion string `json:"provider_version,omitempty" yaml:"provider_version,omitempty" toml:"provider_version,omitempty"`
// Company 指定签名提供方公司。
Company string `json:"company,omitempty" yaml:"company,omitempty" toml:"company,omitempty"`
// Method 指定签名方法。
Method string `json:"method,omitempty" yaml:"method,omitempty" toml:"method,omitempty"`
// Date 记录签名时间。
Date string `json:"date,omitempty" yaml:"date,omitempty" toml:"date,omitempty"`
// CheckMethod 指定签名校验方法。
CheckMethod string `json:"check_method,omitempty" yaml:"check_method,omitempty" toml:"check_method,omitempty"`
// References 定义签名引用及其校验值。
References []SignatureReference `json:"references,omitempty" yaml:"references,omitempty" toml:"references,omitempty"`
// StampAnnots 定义签名盖章区域。
StampAnnots []SignatureStamp `json:"stamp_annots,omitempty" yaml:"stamp_annots,omitempty" toml:"stamp_annots,omitempty"`
// SealFile 指定印章文件路径。
SealFile string `json:"seal_file,omitempty" yaml:"seal_file,omitempty" toml:"seal_file,omitempty"`
// SealFileBase64 提供 Base64 编码的印章数据。
SealFileBase64 string `json:"seal_file_base64,omitempty" yaml:"seal_file_base64,omitempty" toml:"seal_file_base64,omitempty"`
// SealName 指定印章文件名称。
SealName string `json:"seal_name,omitempty" yaml:"seal_name,omitempty" toml:"seal_name,omitempty"`
// SignedValue 提供 Base64 编码的签名值。
SignedValue string `json:"signed_value,omitempty" yaml:"signed_value,omitempty" toml:"signed_value,omitempty"`
// SignedValueName 指定签名值文件名称。
SignedValueName string `json:"signed_value_name,omitempty" yaml:"signed_value_name,omitempty" toml:"signed_value_name,omitempty"`
}
Signature 描述文档数字签名。
type SignatureReference ¶
type SignatureReference struct {
// FileRef 指定签名引用的文件路径。
FileRef string `json:"file_ref,omitempty" yaml:"file_ref,omitempty" toml:"file_ref,omitempty"`
// CheckValue 提供 Base64 编码的文件校验值。
CheckValue string `json:"check_value,omitempty" yaml:"check_value,omitempty" toml:"check_value,omitempty"`
}
SignatureReference 描述数字签名引用的文件及校验值。
type SignatureStamp ¶
type SignatureStamp struct {
// ID 标识签名盖章区域。
ID string `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Page 指定盖章所在页码。
Page int `json:"page,omitempty" yaml:"page,omitempty" toml:"page,omitempty"`
// Boundary 指定盖章区域边界。
Boundary Box `json:"boundary,omitempty" yaml:"boundary,omitempty" toml:"boundary,omitempty"`
// Clip 指定盖章区域裁剪框。
Clip *Box `json:"clip,omitempty" yaml:"clip,omitempty" toml:"clip,omitempty"`
}
SignatureStamp 描述数字签名在页面上的盖章区域。
type SoundAction ¶
type SoundAction struct {
// ResourceID 指定声音资源编号。
ResourceID uint64 `json:"resource_id,omitempty" yaml:"resource_id,omitempty" toml:"resource_id,omitempty"`
// Volume 指定播放音量。
Volume *int `json:"volume,omitempty" yaml:"volume,omitempty" toml:"volume,omitempty"`
// Repeat 指示是否循环播放。
Repeat *bool `json:"repeat,omitempty" yaml:"repeat,omitempty" toml:"repeat,omitempty"`
// Synchronous 指示是否同步播放。
Synchronous *bool `json:"synchronous,omitempty" yaml:"synchronous,omitempty" toml:"synchronous,omitempty"`
}
SoundAction 描述播放声音资源的动作。
type TableCell ¶ added in v0.1.5
type TableCell struct {
// Value 定义单元格文本内容。
Value string `json:"value,omitempty" yaml:"value,omitempty" toml:"value,omitempty"`
// Font 定义字体。
Font string `json:"font,omitempty" yaml:"font,omitempty" toml:"font,omitempty"`
// Size 定义字号。
Size float64 `json:"size,omitempty" yaml:"size,omitempty" toml:"size,omitempty"`
// Weight 定义字重。
Weight int `json:"weight,omitempty" yaml:"weight,omitempty" toml:"weight,omitempty"`
// Italic 指示是否斜体。
Italic bool `json:"italic,omitempty" yaml:"italic,omitempty" toml:"italic,omitempty"`
// Align 定义对齐方式(left/center/right)。
Align string `json:"align,omitempty" yaml:"align,omitempty" toml:"align,omitempty"`
// ColSpan 定义横向合并的列数。
ColSpan int `json:"col_span,omitempty" yaml:"col_span,omitempty" toml:"col_span,omitempty"`
// RowSpan 定义纵向合并的行数。
RowSpan int `json:"row_span,omitempty" yaml:"row_span,omitempty" toml:"row_span,omitempty"`
// FirstLineIndent 定义首行缩进。
FirstLineIndent float64 `json:"first_line_indent,omitempty" yaml:"first_line_indent,omitempty" toml:"first_line_indent,omitempty"`
// HangingIndent 定义续行缩进。
HangingIndent float64 `json:"hanging_indent,omitempty" yaml:"hanging_indent,omitempty" toml:"hanging_indent,omitempty"`
// Format 定义文本格式(text/markdown)。
Format string `json:"format,omitempty" yaml:"format,omitempty" toml:"format,omitempty"`
// FillColor 定义单元格背景色。
FillColor *Color `json:"fill_color,omitempty" yaml:"fill_color,omitempty" toml:"fill_color,omitempty"`
// Actions 定义单元格的点击动作,作用范围是整个单元格。
Actions []Action `json:"actions,omitempty" yaml:"actions,omitempty" toml:"actions,omitempty"`
}
TableCell 定义表格单元格。
type TableRow ¶ added in v0.1.5
type TableRow struct {
// Cells 定义该行包含的单元格。
Cells []TableCell `json:"cells,omitempty" yaml:"cells,omitempty" toml:"cells,omitempty"`
}
TableRow 定义表格行。
type TableStyle ¶ added in v0.1.5
type TableStyle struct {
// HorizontalLines 指示是否绘制横线。
HorizontalLines bool `json:"horizontal_lines,omitempty" yaml:"horizontal_lines,omitempty" toml:"horizontal_lines,omitempty"`
// VerticalLines 指示是否绘制竖线。
VerticalLines bool `json:"vertical_lines,omitempty" yaml:"vertical_lines,omitempty" toml:"vertical_lines,omitempty"`
// LineWidth 定义内部线宽。
LineWidth float64 `json:"line_width,omitempty" yaml:"line_width,omitempty" toml:"line_width,omitempty"`
// StrokeColor 定义边框颜色。
StrokeColor *Color `json:"stroke_color,omitempty" yaml:"stroke_color,omitempty" toml:"stroke_color,omitempty"`
// OuterLineWidth 定义外框线宽。
OuterLineWidth float64 `json:"outer_line_width,omitempty" yaml:"outer_line_width,omitempty" toml:"outer_line_width,omitempty"`
// HeaderLineWidth 定义表头分隔线宽。
HeaderLineWidth float64 `json:"header_line_width,omitempty" yaml:"header_line_width,omitempty" toml:"header_line_width,omitempty"`
// HeaderFillColor 定义表头背景色。
HeaderFillColor *Color `json:"header_fill_color,omitempty" yaml:"header_fill_color,omitempty" toml:"header_fill_color,omitempty"`
// HeaderFont 定义表头字体。
HeaderFont string `json:"header_font,omitempty" yaml:"header_font,omitempty" toml:"header_font,omitempty"`
// HeaderSize 定义表头字号。
HeaderSize float64 `json:"header_size,omitempty" yaml:"header_size,omitempty" toml:"header_size,omitempty"`
// HeaderWeight 定义表头字重。
HeaderWeight int `json:"header_weight,omitempty" yaml:"header_weight,omitempty" toml:"header_weight,omitempty"`
// StrikeColor 定义 Markdown 删除线的颜色;不设时与边框同色。
StrikeColor *Color `json:"strike_color,omitempty" yaml:"strike_color,omitempty" toml:"strike_color,omitempty"`
// LinkColor 定义 Markdown 行内链接的文字颜色;不设时用默认链接蓝。
LinkColor *Color `json:"link_color,omitempty" yaml:"link_color,omitempty" toml:"link_color,omitempty"`
// RuleColor 定义 Markdown 分隔线的颜色;不设时与边框同色。
RuleColor *Color `json:"rule_color,omitempty" yaml:"rule_color,omitempty" toml:"rule_color,omitempty"`
// CodeFont 定义 Markdown 行内代码使用的字体。
CodeFont string `json:"code_font,omitempty" yaml:"code_font,omitempty" toml:"code_font,omitempty"`
}
TableStyle 定义表格样式。
type Template ¶
type Template struct {
// ID 标识模板页。
ID uint64 `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Name 指定模板页名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// ZOrder 指定模板页的层叠顺序。
ZOrder string `json:"z_order,omitempty" yaml:"z_order,omitempty" toml:"z_order,omitempty"`
// Layers 定义模板页图层。
Layers []Layer `json:"layers,omitempty" yaml:"layers,omitempty" toml:"layers,omitempty"`
// Items 定义模板页图元。
Items []Item `json:"items,omitempty" yaml:"items,omitempty" toml:"items,omitempty"`
// Area 定义模板页区域。
Area *PageArea `json:"area,omitempty" yaml:"area,omitempty" toml:"area,omitempty"`
}
Template 描述可供页面引用的模板页。
type TemplateRef ¶
type TemplateRef struct {
// ID 指定所引用的模板页。
ID uint64 `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// ZOrder 指定模板引用的层叠顺序。
ZOrder string `json:"z_order,omitempty" yaml:"z_order,omitempty" toml:"z_order,omitempty"`
}
TemplateRef 描述页面对模板页的引用。
type TextCode ¶
type TextCode struct {
// Value 指定文本内容。
Value string `json:"value,omitempty" yaml:"value,omitempty" toml:"value,omitempty"`
// X 指定文本代码横坐标。
X *float64 `json:"x,omitempty" yaml:"x,omitempty" toml:"x,omitempty"`
// Y 指定文本代码纵坐标。
Y *float64 `json:"y,omitempty" yaml:"y,omitempty" toml:"y,omitempty"`
// DeltaX 指定连续字符的横向偏移量。
DeltaX []float64 `json:"delta_x,omitempty" yaml:"delta_x,omitempty" toml:"delta_x,omitempty"`
// DeltaY 指定连续字符的纵向偏移量。
DeltaY []float64 `json:"delta_y,omitempty" yaml:"delta_y,omitempty" toml:"delta_y,omitempty"`
}
TextCode 描述文本内容及其定位信息。
type TypeDoc ¶ added in v0.1.5
type TypeDoc struct {
// Name 是 Go 结构体名。
Name string
// Path 是从 manifest 根首次到达该结构体的路径,根结构体为空串。
Path string
// Doc 是结构体自身的说明。
Doc string
// Fields 是该结构体的直接字段。
Fields []FieldDoc
}
TypeDoc 是 manifest 里一个结构体的字段说明。
type URIAction ¶
type URIAction struct {
// URI 指定目标 URI。
URI string `json:"uri,omitempty" yaml:"uri,omitempty" toml:"uri,omitempty"`
// Base 指定 URI 基础地址。
Base string `json:"base,omitempty" yaml:"base,omitempty" toml:"base,omitempty"`
// Target 指定 URI 打开目标。
Target string `json:"target,omitempty" yaml:"target,omitempty" toml:"target,omitempty"`
}
URIAction 描述打开或跳转到 URI 的动作。
type ValidPeriod ¶
type ValidPeriod struct {
// Start 指定权限生效时间。
Start string `json:"start,omitempty" yaml:"start,omitempty" toml:"start,omitempty"`
// End 指定权限失效时间。
End string `json:"end,omitempty" yaml:"end,omitempty" toml:"end,omitempty"`
}
ValidPeriod 描述权限的有效时间范围。
type Version ¶
type Version struct {
// ID 标识文档版本。
ID string `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Index 指定版本序号。
Index int `json:"index,omitempty" yaml:"index,omitempty" toml:"index,omitempty"`
// Current 指示是否为当前版本。
Current bool `json:"current,omitempty" yaml:"current,omitempty" toml:"current,omitempty"`
// Version 指定版本号。
Version string `json:"version" yaml:"version" toml:"version"`
// Name 指定版本名称。
Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
// CreationDate 记录版本创建时间。
CreationDate string `json:"creation_date,omitempty" yaml:"creation_date,omitempty" toml:"creation_date,omitempty"`
// DocRoot 指定版本文档根文件路径。
DocRoot string `json:"doc_root,omitempty" yaml:"doc_root,omitempty" toml:"doc_root,omitempty"`
// DocRootBase64 提供 Base64 编码的版本文档根数据。
DocRootBase64 string `json:"doc_root_base64,omitempty" yaml:"doc_root_base64,omitempty" toml:"doc_root_base64,omitempty"`
// DocRootName 指定版本文档根文件名称。
DocRootName string `json:"doc_root_name,omitempty" yaml:"doc_root_name,omitempty" toml:"doc_root_name,omitempty"`
// Files 定义版本包含的文件。
Files []VersionFile `json:"files,omitempty" yaml:"files,omitempty" toml:"files,omitempty"`
}
Version 描述文档的一个版本。
type VersionFile ¶
type VersionFile struct {
// ID 标识版本文件。
ID string `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
// Path 指定文件在版本中的路径。
Path string `json:"path,omitempty" yaml:"path,omitempty" toml:"path,omitempty"`
}
VersionFile 描述文档版本中的文件。
Directories
¶
| Path | Synopsis |
|---|---|
|
Package fielddocs 从 manifest 的 schema 源码中提取字段说明,供 ofd-creator schema 生成字段参考文档,也供生成器产出 fielddocs.go。
|
Package fielddocs 从 manifest 的 schema 源码中提取字段说明,供 ofd-creator schema 生成字段参考文档,也供生成器产出 fielddocs.go。 |
|
cmd/gen-fielddocs
command
gen-fielddocs 读取 internal/manifest/manifest.go 的字段注释,生成 internal/manifest/fielddocs.go。
|
gen-fielddocs 读取 internal/manifest/manifest.go 的字段注释,生成 internal/manifest/fielddocs.go。 |