[{"data":1,"prerenderedAt":2645},["ShallowReactive",2],{"quirekit-doc:\u002Fen\u002Fclassic\u002Fofficial-document":3},{"id":4,"title":5,"body":6,"description":2635,"extension":2636,"keywords":2637,"locale":2638,"meta":2639,"navigation":94,"order":155,"path":2640,"section":2641,"seo":2642,"stem":2643,"__hash__":2644},"docs\u002Fclassic\u002Fofficial-document.en.md","Generate and read back official documents",{"type":7,"value":8,"toc":2620},"minimark",[9,18,29,34,47,219,256,259,263,266,732,736,759,1123,1127,1132,1201,1222,1225,1391,1475,1489,1493,1710,1713,1717,1731,1861,1865,1871,1899,1905,2114,2119,2122,2140,2179,2211,2214,2267,2307,2310,2316,2369,2375,2379,2389,2430,2433,2495,2499,2502,2535,2541,2545,2562,2603,2606,2610,2613,2616],[10,11,12,13,17],"p",{},"A business system, such as forms with a back-end service, only assembles one JSON value following the protocol on this page.\n",[14,15,16],"code",{},"@quirekit\u002Fofficial-document"," lays out the head, red rule, title, structure numbering, sign-off, imprint and page numbers to\nGB\u002FT 9704-2012. The result edits in Classic like any document and exports to Word, PDF and OFD. Its elements carry\nGB\u002FT 33476.2 official-document fields, so the edited document reads back as the same JSON for the business system.",[10,19,20,22,23,28],{},[14,21,16],{}," is a commercial component; obtain the distribution and license first, see ",[24,25,27],"a",{"href":26},"\u002Fen\u002Fclassic\u002Fcommercial","Commercial use",".",[30,31,33],"h2",{"id":32},"_1-flow","1. Flow",[35,36,37,41,44],"ol",{},[38,39,40],"li",{},"The business system builds official-document JSON from the form (sections 2-8).",[38,42,43],{},"The front end validates it, compiles it and loads the document into Classic.",[38,45,46],{},"People edit and export online; when needed, read the content back as JSON (section 10) for the business system to store.",[48,49,54],"pre",{"className":50,"code":51,"language":52,"meta":53,"style":53},"language-ts shiki shiki-themes github-light github-light github-dark","import { validateOfficialDocumentData } from '@quirekit\u002Fofficial-document'\nimport { readOfficialDocumentData } from '@quirekit\u002Fofficial-document\u002Fclassic'\n\nconst checked = validateOfficialDocumentData(await response.json())\nif (!checked.ok) showIssues(checked.issues) \u002F\u002F each issue has a path and a Chinese message\nelse instance.editor?.commands.composeOfficialDocument(checked.data) \u002F\u002F replaces the whole document in one undoable edit\n\n\u002F\u002F After editing, read the data back with its seals and pictures\nconst extracted = readOfficialDocumentData(instance.editor!)\nif (extracted.ok) await saveToBusinessSystem(extracted.data, extracted.warnings)\n","ts","",[14,55,56,76,89,96,128,153,171,176,182,203],{"__ignoreMap":53},[57,58,61,65,69,72],"span",{"class":59,"line":60},"line",1,[57,62,64],{"class":63},"sDD9d","import",[57,66,68],{"class":67},"sVPnS"," { validateOfficialDocumentData } ",[57,70,71],{"class":63},"from",[57,73,75],{"class":74},"s-HEn"," '@quirekit\u002Fofficial-document'\n",[57,77,79,81,84,86],{"class":59,"line":78},2,[57,80,64],{"class":63},[57,82,83],{"class":67}," { readOfficialDocumentData } ",[57,85,71],{"class":63},[57,87,88],{"class":74}," '@quirekit\u002Fofficial-document\u002Fclassic'\n",[57,90,92],{"class":59,"line":91},3,[57,93,95],{"emptyLinePlaceholder":94},true,"\n",[57,97,99,102,106,109,113,116,119,122,125],{"class":59,"line":98},4,[57,100,101],{"class":63},"const",[57,103,105],{"class":104},"sUNQB"," checked",[57,107,108],{"class":63}," =",[57,110,112],{"class":111},"sgQzM"," validateOfficialDocumentData",[57,114,115],{"class":67},"(",[57,117,118],{"class":63},"await",[57,120,121],{"class":67}," response.",[57,123,124],{"class":111},"json",[57,126,127],{"class":67},"())\n",[57,129,131,134,137,140,143,146,149],{"class":59,"line":130},5,[57,132,133],{"class":63},"if",[57,135,136],{"class":67}," (",[57,138,139],{"class":63},"!",[57,141,142],{"class":67},"checked.ok) ",[57,144,145],{"class":111},"showIssues",[57,147,148],{"class":67},"(checked.issues) ",[57,150,152],{"class":151},"sqmzS","\u002F\u002F each issue has a path and a Chinese message\n",[57,154,156,159,162,165,168],{"class":59,"line":155},6,[57,157,158],{"class":63},"else",[57,160,161],{"class":67}," instance.editor?.commands.",[57,163,164],{"class":111},"composeOfficialDocument",[57,166,167],{"class":67},"(checked.data) ",[57,169,170],{"class":151},"\u002F\u002F replaces the whole document in one undoable edit\n",[57,172,174],{"class":59,"line":173},7,[57,175,95],{"emptyLinePlaceholder":94},[57,177,179],{"class":59,"line":178},8,[57,180,181],{"class":151},"\u002F\u002F After editing, read the data back with its seals and pictures\n",[57,183,185,187,190,192,195,198,200],{"class":59,"line":184},9,[57,186,101],{"class":63},[57,188,189],{"class":104}," extracted",[57,191,108],{"class":63},[57,193,194],{"class":111}," readOfficialDocumentData",[57,196,197],{"class":67},"(instance.editor",[57,199,139],{"class":63},[57,201,202],{"class":67},")\n",[57,204,206,208,211,213,216],{"class":59,"line":205},10,[57,207,133],{"class":63},[57,209,210],{"class":67}," (extracted.ok) ",[57,212,118],{"class":63},[57,214,215],{"class":111}," saveToBusinessSystem",[57,217,218],{"class":67},"(extracted.data, extracted.warnings)\n",[10,220,221,223,224,227,228,231,232,235,236,239,240,243,244,247,248,251,252,28],{},[14,222,164],{}," comes with the official-document extension: ",[14,225,226],{},"@quirekit\u002Fclassic-ai"," installs it, and otherwise\ninstall ",[14,229,230],{},"createClassicOfficialDocumentPlugin()"," from ",[14,233,234],{},"@quirekit\u002Fofficial-document\u002Fclassic",". It registers the data's seals and\npictures with the editor's media before replacing the document, and returns ",[14,237,238],{},"false"," without changing the document when the\ndata is invalid. Without the command, register ",[14,241,242],{},"collectOfficialDocumentImages(data)"," with the media first, then load the\nresult of ",[14,245,246],{},"compileOfficialDocument(data)","; read back with ",[14,249,250],{},"extractOfficialDocumentData(instance.getJSON(), { images })",".\nSaving, versions and file conversion are covered in ",[24,253,255],{"href":254},"\u002Fen\u002Fclassic\u002Ffiles","Save, open and convert files",[10,257,258],{},"Word files can also be produced without a browser, by compiling in a Node service and exporting with the Classic DOCX service.\nNode has no browser font measurement, so whether the even-page imprint shares the last body page is judged with estimated\nglyph widths; check the file in Word before delivery.",[30,260,262],{"id":261},"_2-complete-example","2. Complete example",[10,264,265],{},"A notice with a copy number, classification and urgency:",[48,267,270],{"className":268,"code":269,"language":124,"meta":53,"style":53},"language-json shiki shiki-themes github-light github-light github-dark","{\n  \"version\": 1,\n  \"kind\": \"notice\",\n  \"issuer\": { \"agency\": \"示例市政务服务管理局\" },\n  \"copyNumber\": \"000123\",\n  \"secrecy\": { \"level\": \"秘密\", \"term\": \"1年\" },\n  \"urgency\": \"加急\",\n  \"documentNumber\": \"示政发〔2026〕12号\",\n  \"title\": \"示例市政务服务管理局关于2027年元旦放假安排的通知\",\n  \"recipients\": [\"各处室\", \"各直属单位\"],\n  \"body\": [\n    { \"type\": \"paragraph\", \"text\": \"根据国务院办公厅通知精神，结合工作实际，现将2027年元旦放假安排通知如下。\" },\n    { \"type\": \"heading\", \"level\": 1, \"title\": \"放假时间\" },\n    { \"type\": \"paragraph\", \"text\": \"2027年1月1日至3日放假调休，共3天。\" },\n    { \"type\": \"heading\", \"level\": 1, \"title\": \"工作要求\" },\n    { \"type\": \"heading\", \"level\": 2, \"title\": \"严格值班值守。\", \"text\": \"各单位要安排好节日期间值班。\" },\n    { \"type\": \"heading\", \"level\": 2, \"title\": \"做好安全检查。\", \"text\": \"节前开展一次安全隐患排查。\" },\n    { \"type\": \"paragraph\", \"text\": \"特此通知。\" }\n  ],\n  \"attachments\": [\"值班安排表\", \"联系人名单\"],\n  \"date\": \"2026-12-20\",\n  \"note\": \"联系人：李某，电话：12345678\",\n  \"imprint\": { \"cc\": [\"示例市人民政府办公室\"], \"office\": \"示例市政务服务管理局办公室\", \"date\": \"2026-12-20\" }\n}\n",[14,271,272,277,291,303,322,334,362,374,386,398,417,426,452,484,506,536,576,615,638,644,662,675,688,726],{"__ignoreMap":53},[57,273,274],{"class":59,"line":60},[57,275,276],{"class":67},"{\n",[57,278,279,282,285,288],{"class":59,"line":78},[57,280,281],{"class":104},"  \"version\"",[57,283,284],{"class":67},": ",[57,286,287],{"class":104},"1",[57,289,290],{"class":67},",\n",[57,292,293,296,298,301],{"class":59,"line":91},[57,294,295],{"class":104},"  \"kind\"",[57,297,284],{"class":67},[57,299,300],{"class":74},"\"notice\"",[57,302,290],{"class":67},[57,304,305,308,311,314,316,319],{"class":59,"line":98},[57,306,307],{"class":104},"  \"issuer\"",[57,309,310],{"class":67},": { ",[57,312,313],{"class":104},"\"agency\"",[57,315,284],{"class":67},[57,317,318],{"class":74},"\"示例市政务服务管理局\"",[57,320,321],{"class":67}," },\n",[57,323,324,327,329,332],{"class":59,"line":130},[57,325,326],{"class":104},"  \"copyNumber\"",[57,328,284],{"class":67},[57,330,331],{"class":74},"\"000123\"",[57,333,290],{"class":67},[57,335,336,339,341,344,346,349,352,355,357,360],{"class":59,"line":155},[57,337,338],{"class":104},"  \"secrecy\"",[57,340,310],{"class":67},[57,342,343],{"class":104},"\"level\"",[57,345,284],{"class":67},[57,347,348],{"class":74},"\"秘密\"",[57,350,351],{"class":67},", ",[57,353,354],{"class":104},"\"term\"",[57,356,284],{"class":67},[57,358,359],{"class":74},"\"1年\"",[57,361,321],{"class":67},[57,363,364,367,369,372],{"class":59,"line":173},[57,365,366],{"class":104},"  \"urgency\"",[57,368,284],{"class":67},[57,370,371],{"class":74},"\"加急\"",[57,373,290],{"class":67},[57,375,376,379,381,384],{"class":59,"line":178},[57,377,378],{"class":104},"  \"documentNumber\"",[57,380,284],{"class":67},[57,382,383],{"class":74},"\"示政发〔2026〕12号\"",[57,385,290],{"class":67},[57,387,388,391,393,396],{"class":59,"line":184},[57,389,390],{"class":104},"  \"title\"",[57,392,284],{"class":67},[57,394,395],{"class":74},"\"示例市政务服务管理局关于2027年元旦放假安排的通知\"",[57,397,290],{"class":67},[57,399,400,403,406,409,411,414],{"class":59,"line":205},[57,401,402],{"class":104},"  \"recipients\"",[57,404,405],{"class":67},": [",[57,407,408],{"class":74},"\"各处室\"",[57,410,351],{"class":67},[57,412,413],{"class":74},"\"各直属单位\"",[57,415,416],{"class":67},"],\n",[57,418,420,423],{"class":59,"line":419},11,[57,421,422],{"class":104},"  \"body\"",[57,424,425],{"class":67},": [\n",[57,427,429,432,435,437,440,442,445,447,450],{"class":59,"line":428},12,[57,430,431],{"class":67},"    { ",[57,433,434],{"class":104},"\"type\"",[57,436,284],{"class":67},[57,438,439],{"class":74},"\"paragraph\"",[57,441,351],{"class":67},[57,443,444],{"class":104},"\"text\"",[57,446,284],{"class":67},[57,448,449],{"class":74},"\"根据国务院办公厅通知精神，结合工作实际，现将2027年元旦放假安排通知如下。\"",[57,451,321],{"class":67},[57,453,455,457,459,461,464,466,468,470,472,474,477,479,482],{"class":59,"line":454},13,[57,456,431],{"class":67},[57,458,434],{"class":104},[57,460,284],{"class":67},[57,462,463],{"class":74},"\"heading\"",[57,465,351],{"class":67},[57,467,343],{"class":104},[57,469,284],{"class":67},[57,471,287],{"class":104},[57,473,351],{"class":67},[57,475,476],{"class":104},"\"title\"",[57,478,284],{"class":67},[57,480,481],{"class":74},"\"放假时间\"",[57,483,321],{"class":67},[57,485,487,489,491,493,495,497,499,501,504],{"class":59,"line":486},14,[57,488,431],{"class":67},[57,490,434],{"class":104},[57,492,284],{"class":67},[57,494,439],{"class":74},[57,496,351],{"class":67},[57,498,444],{"class":104},[57,500,284],{"class":67},[57,502,503],{"class":74},"\"2027年1月1日至3日放假调休，共3天。\"",[57,505,321],{"class":67},[57,507,509,511,513,515,517,519,521,523,525,527,529,531,534],{"class":59,"line":508},15,[57,510,431],{"class":67},[57,512,434],{"class":104},[57,514,284],{"class":67},[57,516,463],{"class":74},[57,518,351],{"class":67},[57,520,343],{"class":104},[57,522,284],{"class":67},[57,524,287],{"class":104},[57,526,351],{"class":67},[57,528,476],{"class":104},[57,530,284],{"class":67},[57,532,533],{"class":74},"\"工作要求\"",[57,535,321],{"class":67},[57,537,539,541,543,545,547,549,551,553,556,558,560,562,565,567,569,571,574],{"class":59,"line":538},16,[57,540,431],{"class":67},[57,542,434],{"class":104},[57,544,284],{"class":67},[57,546,463],{"class":74},[57,548,351],{"class":67},[57,550,343],{"class":104},[57,552,284],{"class":67},[57,554,555],{"class":104},"2",[57,557,351],{"class":67},[57,559,476],{"class":104},[57,561,284],{"class":67},[57,563,564],{"class":74},"\"严格值班值守。\"",[57,566,351],{"class":67},[57,568,444],{"class":104},[57,570,284],{"class":67},[57,572,573],{"class":74},"\"各单位要安排好节日期间值班。\"",[57,575,321],{"class":67},[57,577,579,581,583,585,587,589,591,593,595,597,599,601,604,606,608,610,613],{"class":59,"line":578},17,[57,580,431],{"class":67},[57,582,434],{"class":104},[57,584,284],{"class":67},[57,586,463],{"class":74},[57,588,351],{"class":67},[57,590,343],{"class":104},[57,592,284],{"class":67},[57,594,555],{"class":104},[57,596,351],{"class":67},[57,598,476],{"class":104},[57,600,284],{"class":67},[57,602,603],{"class":74},"\"做好安全检查。\"",[57,605,351],{"class":67},[57,607,444],{"class":104},[57,609,284],{"class":67},[57,611,612],{"class":74},"\"节前开展一次安全隐患排查。\"",[57,614,321],{"class":67},[57,616,618,620,622,624,626,628,630,632,635],{"class":59,"line":617},18,[57,619,431],{"class":67},[57,621,434],{"class":104},[57,623,284],{"class":67},[57,625,439],{"class":74},[57,627,351],{"class":67},[57,629,444],{"class":104},[57,631,284],{"class":67},[57,633,634],{"class":74},"\"特此通知。\"",[57,636,637],{"class":67}," }\n",[57,639,641],{"class":59,"line":640},19,[57,642,643],{"class":67},"  ],\n",[57,645,647,650,652,655,657,660],{"class":59,"line":646},20,[57,648,649],{"class":104},"  \"attachments\"",[57,651,405],{"class":67},[57,653,654],{"class":74},"\"值班安排表\"",[57,656,351],{"class":67},[57,658,659],{"class":74},"\"联系人名单\"",[57,661,416],{"class":67},[57,663,665,668,670,673],{"class":59,"line":664},21,[57,666,667],{"class":104},"  \"date\"",[57,669,284],{"class":67},[57,671,672],{"class":74},"\"2026-12-20\"",[57,674,290],{"class":67},[57,676,678,681,683,686],{"class":59,"line":677},22,[57,679,680],{"class":104},"  \"note\"",[57,682,284],{"class":67},[57,684,685],{"class":74},"\"联系人：李某，电话：12345678\"",[57,687,290],{"class":67},[57,689,691,694,696,699,701,704,707,710,712,715,717,720,722,724],{"class":59,"line":690},23,[57,692,693],{"class":104},"  \"imprint\"",[57,695,310],{"class":67},[57,697,698],{"class":104},"\"cc\"",[57,700,405],{"class":67},[57,702,703],{"class":74},"\"示例市人民政府办公室\"",[57,705,706],{"class":67},"], ",[57,708,709],{"class":104},"\"office\"",[57,711,284],{"class":67},[57,713,714],{"class":74},"\"示例市政务服务管理局办公室\"",[57,716,351],{"class":67},[57,718,719],{"class":104},"\"date\"",[57,721,284],{"class":67},[57,723,672],{"class":74},[57,725,637],{"class":67},[57,727,729],{"class":59,"line":728},24,[57,730,731],{"class":67},"}\n",[30,733,735],{"id":734},"_3-fields","3. Fields",[10,737,738,739,351,742,745,746,749,750,754,755,758],{},"Only ",[14,740,741],{},"kind",[14,743,744],{},"issuer.agency"," and ",[14,747,748],{},"body"," are required. ",[751,752,753],"strong",{},"Omit fields without content",": an optional field written as ",[14,756,757],{},"null","\nor an empty string is rejected.",[760,761,762,778],"table",{},[763,764,765],"thead",{},[766,767,768,772,775],"tr",{},[769,770,771],"th",{},"Field",[769,773,774],{},"Type",[769,776,777],{},"Meaning and rules",[779,780,781,796,808,823,835,848,864,880,893,909,922,945,957,972,988,1000,1012,1024,1037,1052,1064,1081,1093,1105],"tbody",{},[766,782,783,789,793],{},[784,785,786],"td",{},[14,787,788],{},"version",[784,790,791],{},[14,792,287],{},[784,794,795],{},"Protocol version; may be omitted",[766,797,798,802,805],{},[784,799,800],{},[14,801,741],{},[784,803,804],{},"kind value",[784,806,807],{},"See section 5",[766,809,810,815,820],{},[784,811,812],{},[14,813,814],{},"format",[784,816,817],{},[14,818,819],{},"\"letter\"",[784,821,822],{},"Letter format (section 6), usually for a letter (函); omitted uses the document format",[766,824,825,829,832],{},[784,826,827],{},[14,828,744],{},[784,830,831],{},"text",[784,833,834],{},"Issuing agency's full or standard short name, used in the sign-off; the lead agency of a joint document",[766,836,837,842,845],{},[784,838,839],{},[14,840,841],{},"issuer.joint",[784,843,844],{},"text array",[784,846,847],{},"Co-issuing agencies of a joint document, in order after the lead agency",[766,849,850,855,857],{},[784,851,852],{},[14,853,854],{},"issuer.mark",[784,856,831],{},[784,858,859,860,863],{},"Agency mark; defaults to agency + 文件 (+ 令 for an order, + 会议纪要 for minutes); ",[14,861,862],{},"\\n"," breaks lines",[766,865,866,871,874],{},[784,867,868],{},[14,869,870],{},"copyNumber",[784,872,873],{},"digit string",[784,875,876,877],{},"Copy number, usually six digits such as ",[14,878,879],{},"000123",[766,881,882,887,890],{},[784,883,884],{},[14,885,886],{},"secrecy.level",[784,888,889],{},"秘密, 机密, 绝密",[784,891,892],{},"Classification level",[766,894,895,900,902],{},[784,896,897],{},[14,898,899],{},"secrecy.term",[784,901,831],{},[784,903,904,905,908],{},"Period, declassification time or condition such as ",[14,906,907],{},"1年","; set as 机密★1年",[766,910,911,916,919],{},[784,912,913],{},[14,914,915],{},"urgency",[784,917,918],{},"特急, 加急",[784,920,921],{},"Urgency; telegrams also use 特提 and 平急",[766,923,924,929,931],{},[784,925,926],{},[14,927,928],{},"documentNumber",[784,930,831],{},[784,932,933,934,937,938,941,942],{},"Document number with the year in hexagonal brackets, such as ",[14,935,936],{},"示政发〔2026〕12号","; an order number ",[14,939,940],{},"第1号"," or minutes issue ",[14,943,944],{},"第1期",[766,946,947,952,954],{},[784,948,949],{},[14,950,951],{},"signers",[784,953,844],{},[784,955,956],{},"Signers of an upward document (request, report), one per issuing agency in agency order",[766,958,959,964,966],{},[784,960,961],{},[14,962,963],{},"title",[784,965,831],{},[784,967,968,969,971],{},"Title; a long title breaks before 关于 automatically, or use ",[14,970,862],{},"; not used for orders and minutes",[766,973,974,979,981],{},[784,975,976],{},[14,977,978],{},"adoption",[784,980,831],{},[784,982,983,984,987],{},"Adoption statement such as ",[14,985,986],{},"（2026年10月17日……会议通过）",", for resolutions and similar kinds",[766,989,990,995,997],{},[784,991,992],{},[14,993,994],{},"recipients",[784,996,844],{},[784,998,999],{},"Main recipients, one agency per item, without 、 or ：; not used for announcements, public notices and communiqués",[766,1001,1002,1006,1009],{},[784,1003,1004],{},[14,1005,748],{},[784,1007,1008],{},"block array",[784,1010,1011],{},"See section 4",[766,1013,1014,1019,1021],{},[784,1015,1016],{},[14,1017,1018],{},"attachments",[784,1020,844],{},[784,1022,1023],{},"Attachment names without trailing punctuation; numbered when more than one",[766,1025,1026,1031,1034],{},[784,1027,1028],{},[14,1029,1030],{},"signature",[784,1032,1033],{},"sign-off",[784,1035,1036],{},"See section 7",[766,1038,1039,1044,1049],{},[784,1040,1041],{},[14,1042,1043],{},"date",[784,1045,1046],{},[14,1047,1048],{},"YYYY-MM-DD",[784,1050,1051],{},"Date of the document, written as 2026年12月20日; omitted leaves 年 月 日 to fill in",[766,1053,1054,1059,1061],{},[784,1055,1056],{},[14,1057,1058],{},"note",[784,1060,831],{},[784,1062,1063],{},"Note, without brackets",[766,1065,1066,1071,1074],{},[784,1067,1068],{},[14,1069,1070],{},"attendees",[784,1072,1073],{},"list array",[784,1075,1076,1077,1080],{},"Minutes attendance: ",[14,1078,1079],{},"{ \"label\": \"出席\", \"names\": [\"张某\", \"李某\"] }",", labels 出席, 请假, 列席",[766,1082,1083,1088,1090],{},[784,1084,1085],{},[14,1086,1087],{},"imprint.cc",[784,1089,844],{},[784,1091,1092],{},"Copied agencies",[766,1094,1095,1100,1102],{},[784,1096,1097],{},[14,1098,1099],{},"imprint.office",[784,1101,831],{},[784,1103,1104],{},"Printing and distributing office, usually the issuer's general office; omitted in the letter format",[766,1106,1107,1112,1116],{},[784,1108,1109],{},[14,1110,1111],{},"imprint.date",[784,1113,1114],{},[14,1115,1048],{},[784,1117,1118,1119,1122],{},"Printing date, omitted in the letter format; omit the whole ",[14,1120,1121],{},"imprint"," when the document has none",[30,1124,1126],{"id":1125},"_4-body","4. Body",[10,1128,1129,1131],{},[14,1130,748],{}," lists blocks in reading order. There are four kinds:",[760,1133,1134,1147],{},[763,1135,1136],{},[766,1137,1138,1141,1144],{},[769,1139,1140],{},"Block",[769,1142,1143],{},"Form",[769,1145,1146],{},"Layout",[779,1148,1149,1162,1175,1188],{},[766,1150,1151,1154,1159],{},[784,1152,1153],{},"Paragraph",[784,1155,1156],{},[14,1157,1158],{},"{ \"type\": \"paragraph\", \"text\": \"…\" }",[784,1160,1161],{},"FangSong 16 pt with a two-character indent; do not start with spaces",[766,1163,1164,1167,1172],{},[784,1165,1166],{},"Heading",[784,1168,1169],{},[14,1170,1171],{},"{ \"type\": \"heading\", \"level\": 1, \"title\": \"…\" }",[784,1173,1174],{},"Levels 1-4 are numbered 一、, （一）, 1. and （1）; lower levels restart under each upper heading",[766,1176,1177,1180,1185],{},[784,1178,1179],{},"Table",[784,1181,1182],{},[14,1183,1184],{},"{ \"type\": \"table\", \"title\": \"…\", \"header\": [[…]], \"rows\": [[…]] }",[784,1186,1187],{},"Full body width with 0.5 pt single rules; title centred above (SimHei), header rows in SimHei, centred and repeated on every page; rows never split",[766,1189,1190,1193,1198],{},[784,1191,1192],{},"Image",[784,1194,1195],{},[14,1196,1197],{},"{ \"type\": \"image\", \"src\": \"data:image\u002Fpng;base64,…\", \"caption\": \"…\" }",[784,1199,1200],{},"On its own line, centred, caption centred below",[1202,1203,1204,1210],"ul",{},[38,1205,1206,1209],{},[751,1207,1208],{},"Do not write ordinals"," in titles; they are generated. The first heading must be level 1.",[38,1211,1212,1213,1215,1216,1218,1219,28],{},"When body text continues on the heading's line, end ",[14,1214,963],{}," with 。 and put the text in ",[14,1217,831],{},":\n",[14,1220,1221],{},"{ \"type\": \"heading\", \"level\": 2, \"title\": \"严格值班值守。\", \"text\": \"各单位要安排好节日期间值班。\" }",[10,1223,1224],{},"Tables:",[48,1226,1228],{"className":268,"code":1227,"language":124,"meta":53,"style":53},"{\n  \"type\": \"table\",\n  \"title\": \"表1 2027年培训安排\",\n  \"header\": [[\"时间\", \"内容\", \"对象\"]],\n  \"rows\": [[\"3月\", \"公文格式\", \"各处室\"], [\"4月\", \"公文处理\\n办文流程\", \"办公室\"]],\n  \"columns\": [{ \"width\": 1, \"align\": \"center\" }, { \"width\": 3 }, { \"width\": 2, \"align\": \"center\" }],\n  \"fontSize\": 14\n}\n",[14,1229,1230,1234,1246,1257,1281,1323,1377,1387],{"__ignoreMap":53},[57,1231,1232],{"class":59,"line":60},[57,1233,276],{"class":67},[57,1235,1236,1239,1241,1244],{"class":59,"line":78},[57,1237,1238],{"class":104},"  \"type\"",[57,1240,284],{"class":67},[57,1242,1243],{"class":74},"\"table\"",[57,1245,290],{"class":67},[57,1247,1248,1250,1252,1255],{"class":59,"line":91},[57,1249,390],{"class":104},[57,1251,284],{"class":67},[57,1253,1254],{"class":74},"\"表1 2027年培训安排\"",[57,1256,290],{"class":67},[57,1258,1259,1262,1265,1268,1270,1273,1275,1278],{"class":59,"line":98},[57,1260,1261],{"class":104},"  \"header\"",[57,1263,1264],{"class":67},": [[",[57,1266,1267],{"class":74},"\"时间\"",[57,1269,351],{"class":67},[57,1271,1272],{"class":74},"\"内容\"",[57,1274,351],{"class":67},[57,1276,1277],{"class":74},"\"对象\"",[57,1279,1280],{"class":67},"]],\n",[57,1282,1283,1286,1288,1291,1293,1296,1298,1300,1303,1306,1308,1311,1313,1316,1318,1321],{"class":59,"line":130},[57,1284,1285],{"class":104},"  \"rows\"",[57,1287,1264],{"class":67},[57,1289,1290],{"class":74},"\"3月\"",[57,1292,351],{"class":67},[57,1294,1295],{"class":74},"\"公文格式\"",[57,1297,351],{"class":67},[57,1299,408],{"class":74},[57,1301,1302],{"class":67},"], [",[57,1304,1305],{"class":74},"\"4月\"",[57,1307,351],{"class":67},[57,1309,1310],{"class":74},"\"公文处理",[57,1312,862],{"class":104},[57,1314,1315],{"class":74},"办文流程\"",[57,1317,351],{"class":67},[57,1319,1320],{"class":74},"\"办公室\"",[57,1322,1280],{"class":67},[57,1324,1325,1328,1331,1334,1336,1338,1340,1343,1345,1348,1351,1353,1355,1358,1360,1362,1364,1366,1368,1370,1372,1374],{"class":59,"line":155},[57,1326,1327],{"class":104},"  \"columns\"",[57,1329,1330],{"class":67},": [{ ",[57,1332,1333],{"class":104},"\"width\"",[57,1335,284],{"class":67},[57,1337,287],{"class":104},[57,1339,351],{"class":67},[57,1341,1342],{"class":104},"\"align\"",[57,1344,284],{"class":67},[57,1346,1347],{"class":74},"\"center\"",[57,1349,1350],{"class":67}," }, { ",[57,1352,1333],{"class":104},[57,1354,284],{"class":67},[57,1356,1357],{"class":104},"3",[57,1359,1350],{"class":67},[57,1361,1333],{"class":104},[57,1363,284],{"class":67},[57,1365,555],{"class":104},[57,1367,351],{"class":67},[57,1369,1342],{"class":104},[57,1371,284],{"class":67},[57,1373,1347],{"class":74},[57,1375,1376],{"class":67}," }],\n",[57,1378,1379,1382,1384],{"class":59,"line":173},[57,1380,1381],{"class":104},"  \"fontSize\"",[57,1383,284],{"class":67},[57,1385,1386],{"class":104},"14\n",[57,1388,1389],{"class":59,"line":178},[57,1390,731],{"class":67},[760,1392,1393,1402],{},[763,1394,1395],{},[766,1396,1397,1399],{},[769,1398,771],{},[769,1400,1401],{},"Meaning",[779,1403,1404,1413,1423,1436,1465],{},[766,1405,1406,1410],{},[784,1407,1408],{},[14,1409,963],{},[784,1411,1412],{},"Table title, optional",[766,1414,1415,1420],{},[784,1416,1417],{},[14,1418,1419],{},"header",[784,1421,1422],{},"Header rows, optional; repeated on every page the table spans",[766,1424,1425,1430],{},[784,1426,1427],{},[14,1428,1429],{},"rows",[784,1431,1432,1433,1435],{},"Body rows; every row, header rows included, has one string per column, without merged cells; ",[14,1434,862],{}," in a cell starts a new paragraph",[766,1437,1438,1443],{},[784,1439,1440],{},[14,1441,1442],{},"columns",[784,1444,1445,1446,1449,1450,1453,1454,1457,1458,1461,1462],{},"One entry per column: ",[14,1447,1448],{},"width"," is relative (equal by default), ",[14,1451,1452],{},"align"," is ",[14,1455,1456],{},"start"," (default), ",[14,1459,1460],{},"center"," or ",[14,1463,1464],{},"end",[766,1466,1467,1472],{},[784,1468,1469],{},[14,1470,1471],{},"fontSize",[784,1473,1474],{},"Table text size: 16 (三号, default), 14 (四号) or 12 (小四)",[10,1476,1477,1478,1481,1482,1484,1485,1488],{},"Images: ",[14,1479,1480],{},"src"," is a PNG or JPEG data URL; ",[14,1483,1448],{}," is in mm, by default the image's size at 96 dpi and at most the 156 mm body\nwidth, the height following the image; ",[14,1486,1487],{},"caption"," is optional. Images live in the editor's media like seals, see section 7.\nHorizontal tables (GB\u002FT 9704 §8) are not supported yet.",[30,1490,1492],{"id":1491},"_5-document-kinds","5. Document kinds",[760,1494,1495,1509],{},[763,1496,1497],{},[766,1498,1499,1503,1506],{},[769,1500,1501],{},[14,1502,741],{},[769,1504,1505],{},"Kind",[769,1507,1508],{},"Notes",[779,1510,1511,1526,1538,1554,1567,1580,1592,1604,1616,1628,1643,1657,1669,1682,1694],{},[766,1512,1513,1518,1521],{},[784,1514,1515],{},[14,1516,1517],{},"resolution",[784,1519,1520],{},"决议",[784,1522,1523,1524],{},"Usually unsigned, often with ",[14,1525,978],{},[766,1527,1528,1533,1536],{},[784,1529,1530],{},[14,1531,1532],{},"decision",[784,1534,1535],{},"决定",[784,1537],{},[766,1539,1540,1545,1548],{},[784,1541,1542],{},[14,1543,1544],{},"order",[784,1546,1547],{},"命令（令）",[784,1549,1550,1551,1553],{},"Order head without title or recipients; ",[14,1552,928],{}," is the order number; signed by a leader",[766,1555,1556,1561,1564],{},[784,1557,1558],{},[14,1559,1560],{},"communique",[784,1562,1563],{},"公报",[784,1565,1566],{},"Usually without recipients or sign-off",[766,1568,1569,1574,1577],{},[784,1570,1571],{},[14,1572,1573],{},"announcement",[784,1575,1576],{},"公告",[784,1578,1579],{},"Usually without recipients",[766,1581,1582,1587,1590],{},[784,1583,1584],{},[14,1585,1586],{},"public-notice",[784,1588,1589],{},"通告",[784,1591,1579],{},[766,1593,1594,1599,1602],{},[784,1595,1596],{},[14,1597,1598],{},"opinion",[784,1600,1601],{},"意见",[784,1603],{},[766,1605,1606,1611,1614],{},[784,1607,1608],{},[14,1609,1610],{},"notice",[784,1612,1613],{},"通知",[784,1615],{},[766,1617,1618,1623,1626],{},[784,1619,1620],{},[14,1621,1622],{},"circular",[784,1624,1625],{},"通报",[784,1627],{},[766,1629,1630,1635,1638],{},[784,1631,1632],{},[14,1633,1634],{},"report",[784,1636,1637],{},"报告",[784,1639,1640,1641],{},"Upward document; write ",[14,1642,951],{},[766,1644,1645,1650,1653],{},[784,1646,1647],{},[14,1648,1649],{},"request",[784,1651,1652],{},"请示",[784,1654,1640,1655],{},[14,1656,951],{},[766,1658,1659,1664,1667],{},[784,1660,1661],{},[14,1662,1663],{},"reply",[784,1665,1666],{},"批复",[784,1668],{},[766,1670,1671,1676,1679],{},[784,1672,1673],{},[14,1674,1675],{},"proposal",[784,1677,1678],{},"议案",[784,1680,1681],{},"Signed by a leader",[766,1683,1684,1689,1692],{},[784,1685,1686],{},[14,1687,1688],{},"letter",[784,1690,1691],{},"函",[784,1693],{},[766,1695,1696,1701,1704],{},[784,1697,1698],{},[14,1699,1700],{},"minutes",[784,1702,1703],{},"纪要",[784,1705,1706,1707,1709],{},"Minutes head without title or recipients; write ",[14,1708,1070],{},"; usually unsigned",[10,1711,1712],{},"Orders and minutes cannot be joint documents; orders take no copy number, classification or urgency.",[30,1714,1716],{"id":1715},"_6-letter-format","6. Letter format",[10,1718,1719,1720,1723,1724,1726,1727,1730],{},"With ",[14,1721,1722],{},"\"format\": \"letter\""," the document follows GB\u002FT 9704 10.1: the agency mark is the agency name without 文件, its top edge\n30 mm below the page top; 4 mm below it a red double rule (thick over thin), and 20 mm above the page bottom another (thin over\nthick), both 170 mm long. Copy number, classification and urgency sit flush left and the document number flush right, with the\ntitle two lines below; the first page shows no page number; the imprint lists copied agencies only (",[14,1725,1121],{}," with ",[14,1728,1729],{},"cc",") at the\nbottom of the last page. A joint letter uses the lead agency's mark, while the sign-off still lists every agency. The letter format\ntakes no signers and is not available for orders or minutes.",[48,1732,1734],{"className":268,"code":1733,"language":124,"meta":53,"style":53},"{\n  \"kind\": \"letter\",\n  \"format\": \"letter\",\n  \"issuer\": { \"agency\": \"示例市政务服务管理局\" },\n  \"documentNumber\": \"示政函〔2026〕5号\",\n  \"title\": \"关于商请协助开展公文规范培训的函\",\n  \"recipients\": [\"示例市档案局\"],\n  \"body\": [{ \"type\": \"paragraph\", \"text\": \"专此函达。\" }],\n  \"date\": \"2026-12-20\",\n  \"imprint\": { \"cc\": [\"示例市财政局\"] }\n}\n",[14,1735,1736,1740,1750,1761,1775,1786,1797,1808,1831,1841,1857],{"__ignoreMap":53},[57,1737,1738],{"class":59,"line":60},[57,1739,276],{"class":67},[57,1741,1742,1744,1746,1748],{"class":59,"line":78},[57,1743,295],{"class":104},[57,1745,284],{"class":67},[57,1747,819],{"class":74},[57,1749,290],{"class":67},[57,1751,1752,1755,1757,1759],{"class":59,"line":91},[57,1753,1754],{"class":104},"  \"format\"",[57,1756,284],{"class":67},[57,1758,819],{"class":74},[57,1760,290],{"class":67},[57,1762,1763,1765,1767,1769,1771,1773],{"class":59,"line":98},[57,1764,307],{"class":104},[57,1766,310],{"class":67},[57,1768,313],{"class":104},[57,1770,284],{"class":67},[57,1772,318],{"class":74},[57,1774,321],{"class":67},[57,1776,1777,1779,1781,1784],{"class":59,"line":130},[57,1778,378],{"class":104},[57,1780,284],{"class":67},[57,1782,1783],{"class":74},"\"示政函〔2026〕5号\"",[57,1785,290],{"class":67},[57,1787,1788,1790,1792,1795],{"class":59,"line":155},[57,1789,390],{"class":104},[57,1791,284],{"class":67},[57,1793,1794],{"class":74},"\"关于商请协助开展公文规范培训的函\"",[57,1796,290],{"class":67},[57,1798,1799,1801,1803,1806],{"class":59,"line":173},[57,1800,402],{"class":104},[57,1802,405],{"class":67},[57,1804,1805],{"class":74},"\"示例市档案局\"",[57,1807,416],{"class":67},[57,1809,1810,1812,1814,1816,1818,1820,1822,1824,1826,1829],{"class":59,"line":178},[57,1811,422],{"class":104},[57,1813,1330],{"class":67},[57,1815,434],{"class":104},[57,1817,284],{"class":67},[57,1819,439],{"class":74},[57,1821,351],{"class":67},[57,1823,444],{"class":104},[57,1825,284],{"class":67},[57,1827,1828],{"class":74},"\"专此函达。\"",[57,1830,1376],{"class":67},[57,1832,1833,1835,1837,1839],{"class":59,"line":184},[57,1834,667],{"class":104},[57,1836,284],{"class":67},[57,1838,672],{"class":74},[57,1840,290],{"class":67},[57,1842,1843,1845,1847,1849,1851,1854],{"class":59,"line":205},[57,1844,693],{"class":104},[57,1846,310],{"class":67},[57,1848,698],{"class":104},[57,1850,405],{"class":67},[57,1852,1853],{"class":74},"\"示例市财政局\"",[57,1855,1856],{"class":67},"] }\n",[57,1858,1859],{"class":59,"line":419},[57,1860,731],{"class":67},[30,1862,1864],{"id":1863},"_7-sign-off-and-joint-documents","7. Sign-off and joint documents",[10,1866,1867,1868,1870],{},"Without ",[14,1869,1030],{}," the document is signed by the agency (the unsealed layout). The other forms:",[1202,1872,1873,1880,1887,1893],{},[38,1874,1875,1876,1879],{},"Sealed: ",[14,1877,1878],{},"{ \"type\": \"sealed\" }",", see \"Seals and signature stamps\" below",[38,1881,1882,1883,1886],{},"Signers' signature stamps: ",[14,1884,1885],{},"{ \"type\": \"stamp\", \"stamps\": [...] }",", see below",[38,1888,1889,1890],{},"Leader sign-off (orders, proposals): ",[14,1891,1892],{},"{ \"type\": \"leader\", \"position\": \"市长\", \"name\": \"张某\" }",[38,1894,1895,1896],{},"No sign-off (resolutions, communiqués, minutes): ",[14,1897,1898],{},"{ \"type\": \"none\" }",[10,1900,1901,1902,1904],{},"For a joint document, list the co-issuing agencies in ",[14,1903,841],{},": the agency names stack in the head with 文件 centred on\ntheir right, and the sign-off lists the lead agency first and the others below. Signers of an upward document sit two per line\nin agency order:",[48,1906,1908],{"className":268,"code":1907,"language":124,"meta":53,"style":53},"{\n  \"kind\": \"request\",\n  \"issuer\": { \"agency\": \"示例市政务服务管理局\", \"joint\": [\"示例市财政局\"] },\n  \"documentNumber\": \"示政请〔2026〕3号\",\n  \"signers\": [\"张某\", \"李某\"],\n  \"title\": \"关于联合开展公文规范培训的请示\",\n  \"recipients\": [\"示例市人民政府\"],\n  \"body\": [\n    { \"type\": \"paragraph\", \"text\": \"为提高公文办理质量，拟联合开展公文规范培训。现将有关事项请示如下。\" },\n    { \"type\": \"heading\", \"level\": 1, \"title\": \"培训安排\" },\n    { \"type\": \"paragraph\", \"text\": \"拟于2027年3月组织一次专题培训。\" },\n    { \"type\": \"paragraph\", \"text\": \"妥否，请批示。\" }\n  ],\n  \"date\": \"2026-12-20\"\n}\n",[14,1909,1910,1914,1925,1949,1960,1977,1988,1999,2005,2026,2055,2076,2097,2101,2110],{"__ignoreMap":53},[57,1911,1912],{"class":59,"line":60},[57,1913,276],{"class":67},[57,1915,1916,1918,1920,1923],{"class":59,"line":78},[57,1917,295],{"class":104},[57,1919,284],{"class":67},[57,1921,1922],{"class":74},"\"request\"",[57,1924,290],{"class":67},[57,1926,1927,1929,1931,1933,1935,1937,1939,1942,1944,1946],{"class":59,"line":91},[57,1928,307],{"class":104},[57,1930,310],{"class":67},[57,1932,313],{"class":104},[57,1934,284],{"class":67},[57,1936,318],{"class":74},[57,1938,351],{"class":67},[57,1940,1941],{"class":104},"\"joint\"",[57,1943,405],{"class":67},[57,1945,1853],{"class":74},[57,1947,1948],{"class":67},"] },\n",[57,1950,1951,1953,1955,1958],{"class":59,"line":98},[57,1952,378],{"class":104},[57,1954,284],{"class":67},[57,1956,1957],{"class":74},"\"示政请〔2026〕3号\"",[57,1959,290],{"class":67},[57,1961,1962,1965,1967,1970,1972,1975],{"class":59,"line":130},[57,1963,1964],{"class":104},"  \"signers\"",[57,1966,405],{"class":67},[57,1968,1969],{"class":74},"\"张某\"",[57,1971,351],{"class":67},[57,1973,1974],{"class":74},"\"李某\"",[57,1976,416],{"class":67},[57,1978,1979,1981,1983,1986],{"class":59,"line":155},[57,1980,390],{"class":104},[57,1982,284],{"class":67},[57,1984,1985],{"class":74},"\"关于联合开展公文规范培训的请示\"",[57,1987,290],{"class":67},[57,1989,1990,1992,1994,1997],{"class":59,"line":173},[57,1991,402],{"class":104},[57,1993,405],{"class":67},[57,1995,1996],{"class":74},"\"示例市人民政府\"",[57,1998,416],{"class":67},[57,2000,2001,2003],{"class":59,"line":178},[57,2002,422],{"class":104},[57,2004,425],{"class":67},[57,2006,2007,2009,2011,2013,2015,2017,2019,2021,2024],{"class":59,"line":184},[57,2008,431],{"class":67},[57,2010,434],{"class":104},[57,2012,284],{"class":67},[57,2014,439],{"class":74},[57,2016,351],{"class":67},[57,2018,444],{"class":104},[57,2020,284],{"class":67},[57,2022,2023],{"class":74},"\"为提高公文办理质量，拟联合开展公文规范培训。现将有关事项请示如下。\"",[57,2025,321],{"class":67},[57,2027,2028,2030,2032,2034,2036,2038,2040,2042,2044,2046,2048,2050,2053],{"class":59,"line":205},[57,2029,431],{"class":67},[57,2031,434],{"class":104},[57,2033,284],{"class":67},[57,2035,463],{"class":74},[57,2037,351],{"class":67},[57,2039,343],{"class":104},[57,2041,284],{"class":67},[57,2043,287],{"class":104},[57,2045,351],{"class":67},[57,2047,476],{"class":104},[57,2049,284],{"class":67},[57,2051,2052],{"class":74},"\"培训安排\"",[57,2054,321],{"class":67},[57,2056,2057,2059,2061,2063,2065,2067,2069,2071,2074],{"class":59,"line":419},[57,2058,431],{"class":67},[57,2060,434],{"class":104},[57,2062,284],{"class":67},[57,2064,439],{"class":74},[57,2066,351],{"class":67},[57,2068,444],{"class":104},[57,2070,284],{"class":67},[57,2072,2073],{"class":74},"\"拟于2027年3月组织一次专题培训。\"",[57,2075,321],{"class":67},[57,2077,2078,2080,2082,2084,2086,2088,2090,2092,2095],{"class":59,"line":428},[57,2079,431],{"class":67},[57,2081,434],{"class":104},[57,2083,284],{"class":67},[57,2085,439],{"class":74},[57,2087,351],{"class":67},[57,2089,444],{"class":104},[57,2091,284],{"class":67},[57,2093,2094],{"class":74},"\"妥否，请批示。\"",[57,2096,637],{"class":67},[57,2098,2099],{"class":59,"line":454},[57,2100,643],{"class":67},[57,2102,2103,2105,2107],{"class":59,"line":486},[57,2104,667],{"class":104},[57,2106,284],{"class":67},[57,2108,2109],{"class":74},"\"2026-12-20\"\n",[57,2111,2112],{"class":59,"line":508},[57,2113,731],{"class":67},[2115,2116,2118],"h3",{"id":2117},"seals-and-signature-stamps","Seals and signature stamps",[10,2120,2121],{},"Laid out to GB\u002FT 9704-2012 §7.3.5.1 and §7.3.5.3, for either setup:",[1202,2123,2124,2134],{},[38,2125,2126,2129,2130,2133],{},[751,2127,2128],{},"With an e-signature system",": give no images. The document lays out the sign-off and reserves the seal positions (invisible,\nmoving with pagination); after export the e-signature system seals at the coordinates ",[14,2131,2132],{},"locateOfficialSeals"," reports.",[38,2135,2136,2139],{},[751,2137,2138],{},"Without one",": give the seal images (PNG data URLs with transparency) in the data; they are placed in the document and\nincluded in Word, PDF and OFD exports.",[48,2141,2143],{"className":268,"code":2142,"language":124,"meta":53,"style":53},"{ \"type\": \"sealed\", \"seals\": [\"data:image\u002Fpng;base64,iVBORw0...\"], \"diameter\": 42 }\n",[14,2144,2145],{"__ignoreMap":53},[57,2146,2147,2150,2152,2154,2157,2159,2162,2164,2167,2169,2172,2174,2177],{"class":59,"line":60},[57,2148,2149],{"class":67},"{ ",[57,2151,434],{"class":104},[57,2153,284],{"class":67},[57,2155,2156],{"class":74},"\"sealed\"",[57,2158,351],{"class":67},[57,2160,2161],{"class":104},"\"seals\"",[57,2163,405],{"class":67},[57,2165,2166],{"class":74},"\"data:image\u002Fpng;base64,iVBORw0...\"",[57,2168,706],{"class":67},[57,2170,2171],{"class":104},"\"diameter\"",[57,2173,284],{"class":67},[57,2175,2176],{"class":104},"42",[57,2178,637],{"class":67},[760,2180,2181,2189],{},[763,2182,2183],{},[766,2184,2185,2187],{},[769,2186,771],{},[769,2188,1401],{},[779,2190,2191,2201],{},[766,2192,2193,2198],{},[784,2194,2195],{},[14,2196,2197],{},"seals",[784,2199,2200],{},"One per issuing agency in agency order; omit to reserve every position. The count must equal the number of agencies",[766,2202,2203,2208],{},[784,2204,2205],{},[14,2206,2207],{},"diameter",[784,2209,2210],{},"Seal diameter in mm, 20–60, default 42",[10,2212,2213],{},"A sealed date stands four characters from the right, the agency is centred on it, and the seal is concentric with them, its top\nhalf a line below the body. A joint document sets its seals in a row in agency order, the last one on the date and the others to\nits left, 2 mm apart; when the agency names are too long to sit under their seals side by side, the seals stack one per row.",[48,2215,2217],{"className":268,"code":2216,"language":124,"meta":53,"style":53},"{ \"type\": \"stamp\", \"stamps\": [{ \"position\": \"示例市人民政府市长\", \"image\": \"data:image\u002Fpng;base64,iVBORw0...\" }], \"height\": 15 }\n",[14,2218,2219],{"__ignoreMap":53},[57,2220,2221,2223,2225,2227,2230,2232,2235,2237,2240,2242,2245,2247,2250,2252,2254,2257,2260,2262,2265],{"class":59,"line":60},[57,2222,2149],{"class":67},[57,2224,434],{"class":104},[57,2226,284],{"class":67},[57,2228,2229],{"class":74},"\"stamp\"",[57,2231,351],{"class":67},[57,2233,2234],{"class":104},"\"stamps\"",[57,2236,1330],{"class":67},[57,2238,2239],{"class":104},"\"position\"",[57,2241,284],{"class":67},[57,2243,2244],{"class":74},"\"示例市人民政府市长\"",[57,2246,351],{"class":67},[57,2248,2249],{"class":104},"\"image\"",[57,2251,284],{"class":67},[57,2253,2166],{"class":74},[57,2255,2256],{"class":67}," }], ",[57,2258,2259],{"class":104},"\"height\"",[57,2261,284],{"class":67},[57,2263,2264],{"class":104},"15",[57,2266,637],{"class":67},[760,2268,2269,2277],{},[763,2270,2271],{},[766,2272,2273,2275],{},[769,2274,771],{},[769,2276,1401],{},[779,2278,2279,2297],{},[766,2280,2281,2286],{},[784,2282,2283],{},[14,2284,2285],{},"stamps",[784,2287,2288,2289,2292,2293,2296],{},"One per issuing agency in agency order: ",[14,2290,2291],{},"position"," is the signer's full title, ",[14,2294,2295],{},"image"," the stamp, omitted to reserve the position",[766,2298,2299,2304],{},[784,2300,2301],{},[14,2302,2303],{},"height",[784,2305,2306],{},"Stamp height in mm, 8–30, default 15; the width follows the image, or 2.5 × the height without one",[10,2308,2309],{},"The stamp stands two blank lines below the body and four characters from the right, the title two characters to its left and\ncentred on it, and the date one blank line below the stamp, four characters from the right; a joint document has one agency per row.",[10,2311,2312,2313,2315],{},"In the browser, ",[14,2314,234],{}," reports the positions:",[48,2317,2319],{"className":50,"code":2318,"language":52,"meta":53,"style":53},"import { locateOfficialSeals } from \"@quirekit\u002Fofficial-document\u002Fclassic\";\n\n\u002F\u002F [{ kind: \"seal\", number: 1, reserved: true, page: 1, x: 120.68, y: 215.62, width: 42, height: 42 }]\n\u002F\u002F page counts from 1; x, y, width and height are millimetres from the page's top-left corner, as in PDF export.\nconst positions = locateOfficialSeals(instance.editor!);\n",[14,2320,2321,2336,2340,2345,2350],{"__ignoreMap":53},[57,2322,2323,2325,2328,2330,2333],{"class":59,"line":60},[57,2324,64],{"class":63},[57,2326,2327],{"class":67}," { locateOfficialSeals } ",[57,2329,71],{"class":63},[57,2331,2332],{"class":74}," \"@quirekit\u002Fofficial-document\u002Fclassic\"",[57,2334,2335],{"class":67},";\n",[57,2337,2338],{"class":59,"line":78},[57,2339,95],{"emptyLinePlaceholder":94},[57,2341,2342],{"class":59,"line":91},[57,2343,2344],{"class":151},"\u002F\u002F [{ kind: \"seal\", number: 1, reserved: true, page: 1, x: 120.68, y: 215.62, width: 42, height: 42 }]\n",[57,2346,2347],{"class":59,"line":98},[57,2348,2349],{"class":151},"\u002F\u002F page counts from 1; x, y, width and height are millimetres from the page's top-left corner, as in PDF export.\n",[57,2351,2352,2354,2357,2359,2362,2364,2366],{"class":59,"line":130},[57,2353,101],{"class":63},[57,2355,2356],{"class":104}," positions",[57,2358,108],{"class":63},[57,2360,2361],{"class":111}," locateOfficialSeals",[57,2363,197],{"class":67},[57,2365,139],{"class":63},[57,2367,2368],{"class":67},");\n",[10,2370,2371,2372,2374],{},"Images are kept in the editor's media rather than in the document JSON; ",[14,2373,164],{}," registers them before replacing\nthe document.",[30,2376,2378],{"id":2377},"_8-back-end-validation","8. Back-end validation",[10,2380,2381,2384,2385,2388],{},[14,2382,2383],{},"schema\u002Fofficial-document.schema.json"," in the distribution (JSON Schema 2020-12) describes the field structure, so a back end\ncan validate first with a JSON Schema 2020-12 validator in its own language. ",[14,2386,2387],{},"validateOfficialDocumentData"," also checks\nthe rules a schema cannot state:",[1202,2390,2391,2394,2397,2400,2403,2409,2418,2427],{},[38,2392,2393],{},"every kind except orders and minutes needs a title;",[38,2395,2396],{},"dates must be real calendar days;",[38,2398,2399],{},"the first heading is level 1;",[38,2401,2402],{},"orders take no copy number, classification or urgency, and orders and minutes cannot be joint documents;",[38,2404,2405,2406,2408],{},"there are no more signers than issuing agencies, and ",[14,2407,1070],{}," is for minutes only;",[38,2410,2411,2412,745,2415,2417],{},"the letter format is not for orders or minutes and takes no signers; outside it, an imprint needs ",[14,2413,2414],{},"office",[14,2416,1043],{},";",[38,2419,2420,2421,2423,2424,2426],{},"there are as many seals (",[14,2422,2197],{},") or signature stamps (",[14,2425,2285],{},") as issuing agencies;",[38,2428,2429],{},"every table row, header rows included, has one cell per column.",[10,2431,2432],{},"A failed validation returns every problem with a JSON Pointer path and a Chinese message, ready to show next to the form field:",[48,2434,2436],{"className":268,"code":2435,"language":124,"meta":53,"style":53},"[\n  { \"path\": \"\u002Fissuer\", \"message\": \"缺少必填字段：agency。\" },\n  { \"path\": \"\u002Fdate\", \"message\": \"格式不对，日期请写成 YYYY-MM-DD。\" }\n]\n",[14,2437,2438,2443,2468,2490],{"__ignoreMap":53},[57,2439,2440],{"class":59,"line":60},[57,2441,2442],{"class":67},"[\n",[57,2444,2445,2448,2451,2453,2456,2458,2461,2463,2466],{"class":59,"line":78},[57,2446,2447],{"class":67},"  { ",[57,2449,2450],{"class":104},"\"path\"",[57,2452,284],{"class":67},[57,2454,2455],{"class":74},"\"\u002Fissuer\"",[57,2457,351],{"class":67},[57,2459,2460],{"class":104},"\"message\"",[57,2462,284],{"class":67},[57,2464,2465],{"class":74},"\"缺少必填字段：agency。\"",[57,2467,321],{"class":67},[57,2469,2470,2472,2474,2476,2479,2481,2483,2485,2488],{"class":59,"line":91},[57,2471,2447],{"class":67},[57,2473,2450],{"class":104},[57,2475,284],{"class":67},[57,2477,2478],{"class":74},"\"\u002Fdate\"",[57,2480,351],{"class":67},[57,2482,2460],{"class":104},[57,2484,284],{"class":67},[57,2486,2487],{"class":74},"\"格式不对，日期请写成 YYYY-MM-DD。\"",[57,2489,637],{"class":67},[57,2491,2492],{"class":59,"line":98},[57,2493,2494],{"class":67},"]\n",[30,2496,2498],{"id":2497},"_9-integration-notes","9. Integration notes",[10,2500,2501],{},"The interface is language-neutral: the business system builds JSON that follows this protocol in any language and hands it to\nthe front end over HTTP. When assembling the data:",[1202,2503,2504,2511,2520,2526,2529,2532],{},[38,2505,2506,2507,745,2509,2417],{},"field names use the protocol's camelCase, such as ",[14,2508,928],{},[14,2510,1471],{},[38,2512,2513,2514,2516,2517,2519],{},"leave unset fields out rather than writing ",[14,2515,757],{}," or empty strings (a paragraph's ",[14,2518,831],{}," must not be empty);",[38,2521,2522,2523,2417],{},"write dates as ",[14,2524,2525],{},"2026-12-20",[38,2527,2528],{},"headings carry no ordinals such as 一、 or （一）; the program numbers them;",[38,2530,2531],{},"every table row, header rows included, has one cell per column, and there are as many seals or signature stamps as issuing agencies;",[38,2533,2534],{},"seals, signature stamps and body pictures are data URLs: PNG with transparency for seals and stamps, PNG or JPEG for pictures.",[10,2536,2537,2538,2540],{},"A back end can first validate the structure with ",[14,2539,2383],{}," from the distribution (section 8).\nRead-back JSON has the same structure, so the types used to generate it also deserialize it.",[30,2542,2544],{"id":2543},"_10-read-back","10. Read back",[10,2546,2547,2550,2551,2554,2555,1461,2558,2561],{},[14,2548,2549],{},"extractOfficialDocumentData(document, options?)"," reads editor content (",[14,2552,2553],{},"instance.getJSON()",") or an imported DOCX and returns\n",[14,2556,2557],{},"{ ok: true, data, warnings }",[14,2559,2560],{},"{ ok: false, issues }",":",[1202,2563,2564,2567,2570,2577,2580,2583,2590],{},[38,2565,2566],{},"Only text inside the official-document fields is read; paragraphs started outside them are not, while paragraphs added inside the body are.",[38,2568,2569],{},"Pending revisions read as if all were accepted; the document's revisions are not changed.",[38,2571,2572,2573,2576],{},"Body tables and pictures read back as table and image blocks; content the protocol cannot hold, such as a table with merged\ncells, is skipped with its position in ",[14,2574,2575],{},"warnings",", and an unreadable date stays empty with a warning. Column widths read back\nas the twips they resolved to, in the same proportions.",[38,2578,2579],{},"Joint agencies come from the sign-off; a mismatch with the names in the head produces a warning.",[38,2581,2582],{},"A document edited in Microsoft Word reads back after import (verified with Mac Word 16.109.2).",[38,2584,2585,2586,2589],{},"While editing online, Document elements on the View ribbon opens a right-side panel listing the document's elements by head,\nbody and imprint, edited like a form; changes go into the matching fields and can be undone. The body and attachment note show\na summary and can be located. Import ",[14,2587,2588],{},"@quirekit\u002Fofficial-document\u002Fstyles.css"," for the panel's styles.",[38,2591,2592,2593,2596,2597,231,2600,2602],{},"Seal and signature-stamp images live in the editor's media and read back only with ",[14,2594,2595],{},"{ images: mediaResolver }","; in the browser,\n",[14,2598,2599],{},"readOfficialDocumentData(editor)",[14,2601,234],{}," passes it. An unreadable image produces a warning\nand reads back as a reserved position.",[10,2604,2605],{},"Unedited data compiles back into the same document.",[30,2607,2609],{"id":2608},"_11-current-scope","11. Current scope",[10,2611,2612],{},"Supported: the fifteen kinds above in the document and letter formats, copy number, classification and term, urgency, signers, joint documents, four heading levels, body tables and pictures,\nattachment notes, agency, sealed (reserved or with images), signature-stamp, leader and no sign-off, notes, minutes attendance, copied agencies and printing, odd\u002Feven page numbers, and\nWord\u002FPDF\u002FOFD export.",[10,2614,2615],{},"Not yet supported: horizontal tables and merged table cells. Whether WPS and other\nofficial-document systems recognize the fields is unverified; PDF and OFD exports contain the layout only, without the fields.",[2617,2618,2619],"style",{},"html pre.shiki code .sDD9d, html code.shiki .sDD9d{--shiki-default:#D73A49;--shiki-light:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVPnS, html code.shiki .sVPnS{--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s-HEn, html code.shiki .s-HEn{--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sUNQB, html code.shiki .sUNQB{--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sgQzM, html code.shiki .sgQzM{--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sqmzS, html code.shiki .sqmzS{--shiki-default:#6A737D;--shiki-light:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":53,"searchDepth":78,"depth":78,"links":2621},[2622,2623,2624,2625,2626,2627,2628,2631,2632,2633,2634],{"id":32,"depth":78,"text":33},{"id":261,"depth":78,"text":262},{"id":734,"depth":78,"text":735},{"id":1125,"depth":78,"text":1126},{"id":1491,"depth":78,"text":1492},{"id":1715,"depth":78,"text":1716},{"id":1863,"depth":78,"text":1864,"children":2629},[2630],{"id":2117,"depth":91,"text":2118},{"id":2377,"depth":78,"text":2378},{"id":2497,"depth":78,"text":2498},{"id":2543,"depth":78,"text":2544},{"id":2608,"depth":78,"text":2609},"A business system submits official-document JSON and gets an editable document laid out to GB\u002FT 9704; after editing, the same data format reads back.","md",null,"en",{},"\u002Fen\u002Fclassic\u002Fofficial-document","Classic development",{"title":5,"description":2635},"classic\u002Fofficial-document.en","fAxzoI1Sk1FDWz4BDawRpjS7YhdPVJ53JdKNxtnQczw",1793045225516]