Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
515 views84 pages

HWP Structure in English

Structure of HWP file in English language
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
515 views84 pages

HWP Structure in English

Structure of HWP file in English language
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 84

Translated from Korean to English - www.onlinedoctranslator.

com

Writing
document file
structure
(Hwp Document File Formats)

Writing document file


structure 5.0
Hwp Document2010.06.28
File Formats 5.0
revision 1.2:20141009
Article Document File

order
Copyright················································································One

About this document...·······································································2

I. Article 5.0 File Structure·························································3

1. outline··························································································5

2. data typeexplanation·······································································6

3. Post file structure·········································································7

3.1.  Summary of file structure···················································································7


3.2. Storage information by storage·················································································7
3.2.1. File Recognition Information··············································································7
3.2.2. document information·····················································································8
3.2.3.····································································································main text
9

3.2.4. document summary·····················································································11


3.2.5.···································································································binarydata
12

3.2.6.··································································································Previewtext
12

3.2.7.·······························································································Previewimage
12

3.2.8. document options·······················································································12


3.2.9.·········································································································script
13

3.2.10.···························································································XML template
13

3.2.11. Document history management······································································14

4. datarecord···················································································16

4.1. data recordstructure························································································16


4.2. of 'document information'data record····································································17
4.2.1. document properties····················································································17
Article Document File

4.2.2. ID mapping header·······················································································17

4.2.3.···································································································binarydata
18

4.2.4.···········································································································font
20

4.2.5.······················································································border/background
21

4.2.6. letter shape································································································24


4.2.7.······························································································tab definition
26

4.2.8. paragraph number·······················································································26


4.2.9.··································································································bullet point
27

4.2.10. paragraph shape·······················································································27


4.2.11.····················································································style (paragraphstyle)
29

4.2.12. document random data················································································29


4.2.13. Document data for distribution··········································································31
4.2.14. compatible document·················································································32
4.2.15.······················································································layoutcompatibility
32

4.3. Data record in 'body'··························································································33


4.3.1.···········································Paragraph HeaderTag ID: HWPTAG_PARA_HEADER
33

4.3.2. the text of a paragraph····················································································34


4.3.3. the shape of the text in a paragraph·····································································34
4.3.4. paragraph layout···························································································35
4.3.5. area tags in paragraphs···················································································35
4.3.6. control header······························································································35
4.3.7. paragraph list header······················································································36
4.3.8. control arbitrary data·······················································································36
4.3.9. Controls that contain object common properties (object controls)·····································36
4.3.9.1.··························································································table object
39

4.3.9.2.·····························drawing objects (lines,rectangle, ellipse, arc, polygon, curve)


40

4.3.9.2.1.object element····················································································40
4.3.9.2.2.·························································································line object
42
Article Document File

4.3.9.2.3. rectangle object····················································································43


4.3.9.2.4.ellipse object······················································································43
4.3.9.2.5. polygon object······················································································45
4.3.9.2.6.·························································································arc object
45

4.3.9.2.7.curve object·······················································································45
4.3.9.3. Text formula object··················································································46

4.3.9.4.figure object····························································································46
4.3.9.5.·······························································································OLE object
49

4.3.9.6.bundle object···························································································50
4.3.10.·······················································································non-object controls
···············································································································50

4.3.10.1.zone definition························································································52
4.3.10.1.1.paper settings···················································································52
4.3.10.1.2.········································································footnote/endnote shape
54

4.3.10.1.3.····································································side border/background
55

4.3.10.2.························································································only definition
55

4.3.10.3.·························································································header/footer
56

4.3.10.4.····················································································footnote/endnote
56

4.3.10.5.auto number··························································································57
4.3.10.6.·······················································································new numbering
57

4.3.10.7.·······································································································hide
57

4.3.10.8.·················································································odd/evenadjustment
58

4.3.10.9.··············································································page number location


58

4.3.10.10.···························································································Browsemark
58

4.3.10.11.·····························································································bookmark
59

4.3.10.12.letter overlap·························································································59
4.3.10.13.·································································································rubbish
59
Article Document File

4.3.10.14.hidden explanation··················································································59
4.3.10.15.field start·····························································································60
4.4. Document history management·············································································61
4.4.1. What is document history management?·····························································61
4.4.2. Document History Management Record Information·················································61
4.4.2.1. History item information start·········································································61
4.4.2.2. End of history item information·······································································61
4.4.2.3.··················································································history itemversion
61

4.4.2.4.·····························································································historydate
62

4.4.2.5.···························································································history writer
62

4.4.2.6.····················································································historyexplanation
62

4.4.2.7.comparative information···········································································62
4.4.2.8. most recent document·············································································62
Article Document File
Article Document File

Copyright
Hangeul and Computer Co., Ltd. (hereinafter referred to as 'Hancom') strongly supports the openness and
standardization of document formats. Hancom writes97 document formats have been supported free of
charge, and the XML format of documents from 2002 to 2010 has been disclosed to HWPML.
Actively participating in open document standardization and code-related committees, we have
strived for standardization and openness of file formats. As a result, the HWPML specification
was established as a Korean Industrial Standard (KS X 6101:2011) under the name OWPML. In
addition, Hancom Office actively supported PDF/A-1, the standard format for long-term
preservation of records, and import and save of ODF and OOXML file formats, which are ISO
international document formats.
It is provided to anyone who wants to read this document, and anyone who wishes to copy, distribute, publish,
or use the contents described in this document other than reading this document is subject to this copyright of
Hangul and Computer.You must fully recognize and agree.
Anyone can freely read, copy, distribute, publish and use this document. However, distribution isAll unmodified
originals or copies are limited. Originals and copies must contain the latest version of the
specifications provided by Hancom.
Hancom acquires another exclusive or exclusive right based on the results obtained in accordance
with the Hancom Office text file (.hwp) disclosure document, and actively seeks to exercise it against
Hangul and Computer.You may exercise your right.
In addition, all copyrights for the results developed by referring to this document and the contents described in this
document will belong to the individual or organization that developed the result. However, be sure to include the user
interface, manual, help andAll of them must be listed in the source, and if the product does not have
these components, only the components that exist are listed. Hancom does not guarantee the
accuracy or truthfulness of this document or the results developed with reference to the contents
described in this document.

One
Article Document File

in this documentabout...
This document is one of the file storage formats of the post word processor, which is used in
products after post 2002.
writing documentFile format 5.0 is explained.
This document Describes the main data format, file structure, and record structure of the text document file format 5.0.
Articles Documents Formulas, charts, documents for distribution, The article document file format
3.0, HWPML, is explained in a separate document.

2
I. Article 5.0 File
Structure
(Hwp Document File Format 5.0)
Article Document File

4
Article Document File

1. outline
The document file of the article has .HWP as the default extension unless the user specifies otherwise. The
contents stored in the document file include not only the contents of the document actually entered by the
user and the text decoration information, but also the contents of the document at the time of
editing.Information about fonts and settings that affect typesetting (paper type, margin information,
etc.) are also included.
Document File Format 5.0 supports the Wordian, Wordian, Wordian, Wordian,
Wordian,2005,  Article 2007, Article 2010, Article 2014, etc.), and the large framework is
maintained depending on the document version, but there are slight differences due to additional
information.
 The document file format 5.0 uses a compression function to minimize the file size. compressed
document filesThe part that stores basic information is not compressed, and the part that is actually
compressed is the text and picture related data part entered by the user.
 This article used zlib from zlib.org to compress document files. zlib is open source software whose source
is open on the web. zlib follows the zlib License, which allows free use of the sourceThere is no obligation
to disclose the source for secondary products using the corresponding source. For details, please
refer to the license document file included in zlib.
The structure of the text file format 5.0 is based on the Windows compound file, and the character code isIt is based on the
ISO-10646 standard. Most character information is transmitted and stored in Unicode (UTF-16LE)
format.
For access to Compound File, refer to OLE related materials or MSDN. StgOpenStorage(),
IStorage::Open(), ...

5
Article Document File

2. data typeexplanation
In the following description, the information stored in the document file of the  article is expressed using the data types described in
the table below.
In thedata type, onebyte is represented by 8 bits, andthedata typehavinga lengthofmorethan twobytes is a little endiantype inwhich
theleast significant byteis stored first and themost significant byte is stored last.
When the data stored in the file is an array, it is expressed as 'data type array[number]'. For example, 10 elementsIf it is an
array of words, it is expressed as 'word array[10]'.
data type leng sign expl
th anat
ion
BYTE One One unsigned byte (0 to 255)
WORD 2 Equivalent to 'unsigned int' on 16-bit compilers
DWORD 4 Equivalent to 'unsigned long' on 16-bit compilers
WCHAR 2 Unicode-based character as the basic code of the text
HWPUNIT 4 to 1/7200 inch expressed Writing interiorunit
SHWPUNIT 4 √ to 1/7200 inch expressed Writing interiorunit
UINT8 One Equivalent to 'unsigned int8'
UINT16 2 Equivalent to 'unsigned int16'
UINT32(=UINT) 4 Equivalent to 'unsigned int32'
INT8 One √ Equivalent to 'signed int8'
INT16 2 √ Equivalent to 'signed int16'
INT32 4 √ Equivalent to 'signed int32'
HWPUNIT16 2 √ Same as INT16.
RGB value (0x00bbggrr)displayed in decimal
COLORREF 4 (rr: red 1 byte, gg: green 1 byte, bb: blue 1 byte)
a series ofComposed of BYTE.
BYTE stream Used when referring to other structures within the text.
Table 1data type

WCHAR is a data type that expresses one character expressed as an internal code of . The internal code of the text is Korean, All
characters, including English and Chinese characters, have a fixed length of 2 bytes.
HWPUNIT andSHWPUNIT is a data type for expressing the size of elements that make up a document, such
as the size of characters, the size of pictures, and the margins of paper. Since the resolution of the document
output device is variable, size information cannot be expressed as the number of dots. Therefore, it should be
based on a certain unit, but in , 1/7200 inch is the default use as a unit For example, if the size of [2
inches wide x 1 inch long] is expressed in HWPUNIT type, each becomes 14400 x 7200.

6
Article Document File

3. Text file structure


3.1.  Summary of file structure
The document file of the article generally has the structure shown in the following table. complexSince it has a
file (Compound File) structure, it has a name to distinguish between Storage and Stream internally.
Data is stored in a general binary orrecord structure inone stream, and compression/encryption is performed dependingonthe
stream.may become angry
Storage Stream
explanation distinguis length record Compressio
hed (bytes) structure n/
name Encryption
filerecognition FileHeader fix
information
document DocInfo fix √ √
information

main text BodyTe variable √ √


xtSectio
n0
Section1
...
document \005HwpSummaryInformation fix
summary
BinData
binarydata BinaryData0 variable √
BinaryData1
...
Previewtext PrvText fix
Previewimage PrvImage variable
DocOptions
document _LinkDoc variable
options DrmLicens
e
...
Scripts
script DefaultJScript variable
JScriptVersion
...

XML template XMLTemplateSc variable


hema Instance
...

documenthistor DocHistory variable √ √


y management VersionLog0
VersionLog1
...
Table 2 Allstructure

In the case of a compressed document file, the side reading the document file looks at the 'compression' flag in the 'file recognition
information' item,If it's a compressed file, you'll need to uncompress it to process it. The following
description is based on the file in the unzipped state. The 'record structure' used for 'document
information', 'body' and 'document history management' is explained in detail about the structure
and records used in the 'data record' section.

3.2. Storage information by storage


3.2.1. File Recognition Information
 'File recognition information' is stored to indicate that the text is a document file.

7
Article Document File

The data stored in the FileHeader stream is as follows.


data type length expl
(bytes) anat
ion
BYTE array[32] 32 signature. The document file is "HWP Document File"
file version. Format of 0xMMnnPPrr (e.g. 5.0.3.0)
■ MM: Represents a complete change in the structure of
the document format. numberIf the characters are
DWORD 4 different, it is not compatible with the old version.
■ nn: Indicates that the large structure is the same, but
there is a large change. numberIf the characters are
different, it is not compatible with the old version.
■ PP: Structure is the same, Record has been added, or
incompatible in lower versionsIndicates that no
information has been added. Even if the number is
different, it is compatible with the old version.
■ rr:Indicates that information has been added to the
record. different numbers
Compatible with tool version.
property
rang expl
e anat
ion
bit 0 Compressed or not
DWORD 4
bit 1 passwordset or not
bit 2 Documentation for distribution
bit 3 Save script
bit 4 DRM secured documents
bit 5 Whether the XMLTemplate storage exists
bit 6 documentExistence of history
management
bit 7 formerWhether signature information
exists
bit 8 Whether public certificate is encrypted
bit 9 formerWhether signature reserve is saved
bit 10 Certified certificate DRM security
document
bit 11 CCL document or not
bit 12 to 31 reservation
BYTEarray[216] 216 reservation
total length 256

Table 3 File Recognition Information

3.2.2. document information


Details commonly used in the document, such as the font used in the body, text properties, paragraph properties, tabs, styles,
etc.contains
The data stored in the DocInfo stream is as follows.
Tag ID length level expl
(bytes) anat
ion
HWPTAG_DOCUMENT_PROPERTIES 30 0 Document properties (see Table 14)
HWPTAG_ID_MAPPINGS 32 0 Identity mapping header (see Table
15)
HWPTAG_BIN_DATA variable One binary data (table 17reference)
HWPTAG_FACE_NAME variable One Font (see Table 19)
HWPTAG_BORDER_FILL variable One Border/Background (Table23)
HWPTAG_CHAR_SHAPE 72 One Letter shape (see Table 33)
HWPTAG_TAB_DEF 14 One Tab definition (Table 36reference)
HWPTAG_NUMBERING variable One Paragraph number (see Table 38)
HWPTAG_BULLET 10 One Bullets (see Table 42)
HWPTAG_PARA_SHAPE 54 One Paragraph shape (see Table 43)
HWPTAG_STYLE variable One style (table47)
HWPTAG_MEMO_SHAPE 22 One memo shape
HWPTAG_TRACK_CHANGE_AUTHOR variable One changetracking author

8
Article Document File

HWPTAG_TRACK_CHANGE variable One Change tracking content and


appearance

9
Article Document File

HWPTAG_DOC_DATA variable 0 documentRandom data (see


Table 49)
HWPTAG_FORBIDDEN_CHAR variable 0 non-breaking characters
HWPTAG_COMPATIBLE_DOCUMENT 4 0 Compatibility documents (see Table
54)
HWPTAG_LAYOUT_COMPATIBILITY 20 One layout Compatibility (Table
56reference)
HWPTAG_DISTRIBUTE_DOC_DATA 256 0 Documentation for Distribution
HWPTAG_TRACKCHANGE 1032 One changetracking information
total variable
length
Table 4 Document Information

EachDetails are further covered in <Data record of 'document information'> section.

3.2.3. main text


Contents such as paragraphs, tables, and drawing objects corresponding to the body of the document are stored.
BodyText storage is divided into Section%d streams (%d is the number of the section) according to the section of the body.
areaThe number of is stored in the document properties of document information.
In the first paragraph of each zone, the zone definition record is stored,In the first paragraph of each column
setting, a column definition record is stored.
At the end of each zone, information related to the expansion base (last page, arbitrary side) is stored,At the end
of the last section, memo-related information is stored.
The data stored in the Section stream is paragraphs (paragraph list), and the following paragraph information is repeated.
Tag ID length level expl
(bytes) anat
ion
HWPTAG_PARA_HEADER 22 0 Paragraph header (see Table 58)
HWPTAG_PARA_TEXT variable One The text of the paragraph (see Table 60)
HWPTAG_PARA_CHAR_SHAPE variable One Fonts in paragraphs (see Table 61)
HWPTAG_PARA_LINE_SEG variable One paragraph layout
HWPTAG_PARA_RANGE_TAG variable One Area tags for paragraphs (see Table
63)
HWPTAG_CTRL_HEADER 4 One Control header (see Table 64)
HWPTAG_LIST_HEADER 6 2 Paragraph list header (see Table 65)
HWPTAG_PAGE_DEF 40 2 paper settings
HWPTAG_FOOTNOTE_SHAPE 30 2 footnote/endnoteshape
HWPTAG_PAGE_BORDER_FILL 14 2 side border/background
HWPTAG_SHAPE_COMPONENT 4 2 individual
HWPTAG_TABLE variable 2 table object
HWPTAG_SHAPE_COMPONENT_LINE 20 3 straight object
HWPTAG_SHAPE_COMPONENT_RECTANGLE 9 3 rectangle object
HWPTAG_SHAPE_COMPONENT_ELLIPSE 60 3 ellipse object
HWPTAG_SHAPE_COMPONENT_ARC 25 3 arc object
HWPTAG_SHAPE_COMPONENT_POLYGON variable 3 polygon object
HWPTAG_SHAPE_COMPONENT_CURVE variable 3 curve object
HWPTAG_SHAPE_COMPONENT_OLE 26 3 OLE object
HWPTAG_SHAPE_COMPONENT_PICTURE variable 3 figure object
HWPTAG_CTRL_DATA variable 2 control arbitrary data
HWPTAG_EQEDIT variable 2 formula object
HWPTAG_SHAPE_COMPONENT_TEXTART variable 3 nice writing
HWPTAG_FORM_OBJECT variable 2 form object

1
Article Document File

HWPTAG_MEMO_SHAPE 22 One memo shape


HWPTAG_MEMO_LIST 4 One memo list header
HWPTAG_CHART_DATA 2 2 chart data
HWPTAG_VIDEO_DATA variable 3 video data
HWPTAG_SHAPE_COMPONENT_UNKNOWN 36 3 Unknown
total variable
length
table 5main text

Whenacontrolisincludedinaparagraph,controlrecorddatasuchastheparagraphlistheaderissavedafterthecontrolheader.
ocontrol character (control)
Some of the character codes are used for special purposes to express elements that cannot be expressed in general
characters, such as tables and figures.are using
Characters whose character codes are 0-31 in paragraph content are used for special purposes. It has already
been explained that character 13 is used as an end-of-paragraph identifier. Other special characters can be
expressed as normal characters such as tables or figures.It is used as a control character (control) to
express a document decoration element that cannot be specified.
There are three types of control characters:
- character control [char] = character control treated as one character / size = 1
- inline control [inline] = simple inline control that does not point to a separate object pointer / size = 8
- Extended control [extended] = Extended control where a separate object represents data / size = 8
code expl control type
anat
ion
0 unusable char
One reservation extended
2 Zone Definition / Column Definition extended
Start Fields (Pusher, Hyperlink, Block Bookmark, Table
3 Calculation, Documentsummary, user information, current extended
date/time, document date/time, file path,
cross reference, mail merge, memo, correction code,Privacy)
4 end of field inline
5-7 reservation inline
8 title mark inline
9 tab inline
10 line break char
11 Drawing Object/Table extended
12 reservation extended
13 Para break char
14 reservation extended
15 hidden explanation extended
16 header/footer extended
17 footnote/endnote extended
18 automatic number (footnote,table, etc.) extended
19-20 reservation inline
21 Page controls (hide, bird by number startetc) extended
22 Bookmark/Browsemark extended
23 ruby/textclash extended
24 hyphen char
25-29 reservation char
30 bundle blank char

1
Article Document File

31 fixed-width blank char


Table 6 Controlmessage

When a control character is encountered while reading paragraph content from a document file, the reader of
the document reads or skips according to the type of control character and takes appropriate processing to
move the file pointer to the start of the next data.It should be done. Since some of the control characters
include another list of paragraphs, if the control characters are treated like normal characters, the
document file cannot be read normally.
Control characters that contain paragraph lists, such as tables and footnotes, have their own paragraph lists.
Corresponding lists include the following list header information. The actual paragraphs are then serialized.
There are three types of control within a paragraph as follows.
■ character control
It is a control character expressed as one character without additional information. (3rd ch)
0 One 2 3 4 5 6 7 8 9 10 11

'A' 'B' 'C' ch 'D' 'E' 'F' 'G' 'H' 'I' 'J' 13

■ inline control
It is a control character that can express additional information within 12 bytes (6 WCHAR). If all additional information cannot be
entered in info, it is replaced with an extended control. (8 ch from 3 to 9)
0 One 2 3 4 5 6 7 8 9 10 11

'A' 'B' ch info ch 'C' 13

■ extended control
A control character has a pointer, and the actual object is where the pointer points.It is an existing control
character. (8 ch from 3 to 9)
0 One 2 3 4 5 6 7 8 9 10 11

'A' 'B' ch pointer ch 'C' 13

Control Object Instance

If you say 'control' or 'control character' without additional explanation in this document, you are referring to this extended control.

3.2.4. document summary


\005HwpSummaThe ryInfomation stream hasIn the “File-Document Info-Document Summary”
of the Post menu

1
Article Document File

the dragon is saved


For a detailed explanation of Summary Information,See MSDN The
Summary Information Property Set
TheD oc um e n t S um m a ry In fo rm a t io n an d U se rD ef in ed Pr op er ty Se t

Name Property ID string PropertyID VTtype


Title PIDSI_TITLE 0x00000002 VT_LPSTR
Subject PIDSI_SUBJECT 0x00000003 VT_LPSTR
Author PIDSI_AUTHOR 0x00000004 VT_LPSTR
Keywords PIDSI_KEYWORDS 0x00000005 VT_LPSTR
Comments PIDSI_COMMENTS 0x00000006 VT_LPSTR
Last Saved By PIDSI_LASTAUTHOR 0x00000008 VT_LPSTR
Revision Number PIDSI_REVNUMBER 0x00000009 VT_LPSTR
Last Printed PIDSI_LASTPRINTED 0x0000000B VT_FILETIME (UTC)
CreateTime/Date( (*)) PIDSI_CREATE_DTM 0x0000000C VT_FILETIME (UTC)
Last saved Time/Date((*)) PIDSI_LASTSAVE_DTM 0x0000000D VT_FILETIME (UTC)
Number of Pages PIDSI_PAGECOUNT 0x0000000E VT_I4
Date String (User Defined) HWPPIDSI_DATE_STR 0x00000014 VT_LPSTR
HWPPIDSI_PARACOUN
ParaCount (user defined) 0x00000015 VT_I4
T
Table 7 Documentssummary

3.2.5. binarydata
BinData storage stores binary data attached to documents, such as pictures or OLE objects, as separate streams.stored as

3.2.6. Previewtext
The preview text is stored as a Unicode string in the PrvText stream.

3.2.7. Previewimage
The PrvImage stream hasThe preview image is saved in BMP or GIF format.

3.2.8. document options


DocOptions storage contains information related to connection documents, documents for distribution, public certificate DRM,
and electronic signatures.saved as a stream.
The path of the linked document is stored in the _LinkDoc stream.
The DrmLicense stream stores the version definition of DRM Packaging. The DrmRootSect
stream containsEncryption algorithms are stored.
CertDrmHeader in the stream DRM of packaging Verision justiceSaved.

1
Article Document File

The CertDrmInfo stream stores public certificate DRM information. The DigitalSignature
stream containsElectronic signature information is stored.
PublicKeyInfo stream stores public key information.

3.2.9. script
Scripts storage hasSave the Script code. The Script Version
is stored in the JScriptVersion stream.
data type length (bytes) expl
anat
ion
DWORD 4 script version HIGH
DWORD 4 Script version LOW
total length 8
graph 8 script version

Script header, source, pre source, and post source are stored in the DefaultJScript stream.
data type length expl
(bytes) anat
ion
DWORD 4 Script header length (len1)
WCHAR array[len1] 2×len1 script header
DWORD 4 Script source length (len2)
WCHAR array[len2] 2×len2 script source
DWORD 4 Script Presource length (len3)
WCHAR array[len3] 2×len3 Script Pre Source
DWORD 4 Script Post source length (len4)
WCHAR array[len4] 2×len4 scriptPost source
DWORD 4 script end flag(-One)
total length 20 + (2×len1) + (2×len2) + (2×len3) + (2×len4)
Table 9script

3.2.10. XMLtemplate
XMLTemplate in storage XML template InformationSave.
Schema name strings are stored in the _SchemaName stream.
data type length expl
(bytes) anat
ion
DWORD 4 Schema name length(len1)
WCHARarray[len1] 2×len1 Schema name
total length 4 + (2×len1)
Table 10 Schema name information

The schema string is stored in the Schema stream.


data type length expl
(bytes) anat
ion
DWORD 4 Schema length (len1)
WCHARarray[len1] 2×len1 Schema
total length 4 + (2×len1)
Table 11 Schema length information

1
Article Document File

The instance string is stored in the instance stream.


data type length expl
(bytes) anat
ion
DWORD 4 Instance length (len1)
WCHARarray[len1] 2×len1 Instance
total length 4 + (2×len1)
Table 12 Instance information

3.2.11. Document history management


This is a place to store the history information of documents displayed and created in “File-Document History
Management” of the Post menu.
Each item of document history information is called “history” or “history item”, and each item within the 
Compound structure is stored as a stream named VersionLog%d (%d is the version) inside the storage called
“DocHistory”.Saved. In addition, each item is compressed, encrypted, and stored.
historical information dataSave it as a new storage named “DocHistory”. History information items in
the DocHistory storage are stored in the following structure for backward compatibility in case
additional information is saved later.

DocHistory: Storage
VersionLog0: historical
information stream
VersionLog1: historical
information stream
VersionLog2: historical
information stream
.
.
.
HistoryLastDoc : Last document
stream
[version information storage structure]

history item
item start record
History Info Record 1
History Info Record 2
History Info Record 3
.
.
(user,time, date, etc...)
Recordinformation
data record
end of item record
[History item stream structure]

1
Article Document File

historyitem
item start record
History Info Record 1
History Info Record 2
History Info Record 3
.
.
(user,time, date, etc...)
Recordinformation
data record
end of item record
[History item stream structure]

RECORD_HEADER

data type explanation


BYTE Record Type
UINT Additional data block (RD) BYTE
size
RECORD_DATA (RD)
data type explanation
Various information according to
DATA
record type
[Record configuration]

1
Article Document File

4. datarecord
4.1. data recordstructure
logically relatedA method of storing data together with header information is called a data record.
A stream having a record structure is composed of several consecutive records. A data record is composed of a header and data, and the
entirelogicalstructureiscreated usingeachheaderinformation.
The header of the record contains information in preparation for data expansion. Therefore afterEven when data
is added to a record as the function of a post is expanded, backward compatibility is guaranteed so
that a lower version of a post can read a higher version of a post.

Figure 43 record structure


recordThe size of the header is 32 bits and consists of TagID (10 bits), Level (10 bits), and Size (12 bits).
■ Tag ID: This tag indicates the type of data represented by the record. Tag ID uses 10 bits, so0x000 - 0x3FF is
possible.
- 0x000 - 0x00F = Used for special purposes, not general record tags.
- 0x010 - 0x1FF = Area reserved for internal use by  (HWPTAG_BEGIN = 0x010)
- 0x200 - 0x3FF = Area available for use by external applications
■ Level: In most cases, one object is composed of several records, so oneWe need the concept of "a series of
logically related records" rather than records. A level is information for expressing a logical
grouping of related records. All records constituting a stream can be expressed in a hierarchical
structure, and a level indicates the depth in this hierarchical structure.
■ Size : Indicates the length of the data area in bytes. When all 12 bits are 1, the length of the data area is 4095 bytes or
more. In this case, a DWORD indicating the length is added consecutively to the record header. i.e. more than 4095
bytesWhen it comes to data, a record is represented as:
record

Header (DWORD) Length (DWORD) data

Figure 44 Extended data record structure

1
Article Document File

4.2. of 'document information'data record


Data records used in document information ('DocInfo') are as follows.
Tag ID Value mea
ning
HWPTAG_DOCUMENT_PROPERTIES HWPTAG_BEGIN document properties
HWPTAG_ID_MAPPINGS HWPTAG_BEGIN+1 ID mapping header
HWPTAG_BIN_DATA HWPTAG_BEGIN+2 BinData
HWPTAG_FACE_NAME HWPTAG_BEGIN+3 TypefaceName
HWPTAG_BORDER_FILL HWPTAG_BEGIN+4 border/background
HWPTAG_CHAR_SHAPE HWPTAG_BEGIN+5 letter shape
HWPTAG_TAB_DEF HWPTAG_BEGIN+6 tab definition
HWPTAG_NUMBERING HWPTAG_BEGIN+7 number definition
HWPTAG_BULLET HWPTAG_BEGIN+8 bullet definition
HWPTAG_PARA_SHAPE HWPTAG_BEGIN+9 paragraph shape
HWPTAG_STYLE HWPTAG_BEGIN+10 style
HWPTAG_DOC_DATA HWPTAG_BEGIN+11 arbitrary data in the document
HWPTAG_DISTRIBUTE_DOC_DATA HWPTAG_BEGIN+12 Document data for distribution
RESERVED HWPTAG_BEGIN+13 reservation
HWPTAG_COMPATIBLE_DOCUMENT HWPTAG_BEGIN+14 compatible document
HWPTAG_LAYOUT_COMPATIBILITY HWPTAG_BEGIN+15 layoutcompatibility
HWPTAG_TRACKCHANGE HWPTAG_BEGIN+16 changetracking information
HWPTAG_MEMO_SHAPE HWPTAG_BEGIN+76 memo shape
HWPTAG_FORBIDDEN_CHAR HWPTAG_BEGIN+78 non-breaking characters
HWPTAG_TRACK_CHANGE HWPTAG_BEGIN+80 Change tracking content and
appearance
HWPTAG_TRACK_CHANGE_AUTHOR HWPTAG_BEGIN+81 changetracking author
Table 13 document of information data record

4.2.1. document properties


Tag ID: HWPTAG_DOCUMENT_PROPERTIES
data type length (bytes) expl
anat
ion
UINT16 2 number of zones
Information on various start numbers in
documents
UINT16 2 page start number
UINT16 2 footnotestarting number
UINT16 2 Americasstarting number
UINT16 2 paintingstarting number
UINT16 2 table start number
UINT16 2 formulastarting number
documentPosition information
of my caret
UINT32 4 list id
UINT32 4 Paragraph ID
UINT32 4 Position of a character unit within a paragraph
total length 26
Table 14 Document Properties

4.2.2. ID mapping header


Tag ID: HWPTAG_ID_MAPPINGS

1
Article Document File

data type length expl


(bytes) anat
ion
INT32 array[18] 72 Number of identity mappings (see Table 16)
total length 72 Variable according to doc version
graph 15 id mappingheader

value expl
anat
ion
0 binary data
One Hangul font
2 english font
3 Chinese character font
4 japanese font
5 other fonts
6 symbol font
7 user font
8 border/background
9 letter shape
10 tab definition
11 paragraph number
12 bullet point
13 paragraph shape
14 style
15 Note Appearance (5.0.2.1+)
16 change tracking(5.0.3.2more)
17 change trackingUsers (5.0.3.2 or later)
graph 16 id mapping Countindex

4.2.3. binarydata
Tag ID: HWPTAG_BIN_DATA
data type length expl
(bytes) anat
ion
Information about binary data items, such as pictures and OLEs.
UINT16 2 Properties (see Table 18)
WORD 2 When the Type is "LINK",Absolute path length of
connection file (len1)
WCHAR array[len1] 2×len1 Absolute path of link file when Type is "LINK"
WORD 2 When the Type is "LINK",Relative path length of
concatenated file (len2)
WCHAR array[len2] 2×len2 When the type is "LINK", the relative path of the linked file
TypeWhen "EMBEDDING" or "STORAGE",
UINT16 2 ID of binary data stored in BINDATASTORAGE
When the Type is "EMBEDDING", Format of binary data
WORD 2 length of name (len3)
When the Type is "EMBEDDING", extension (except ".")
WCHAR array[len3] 2×len3 jpg
case of bmp
painting gif
OLE'scase ole
total length variable 10+ (2×len1) + (2×len2) + (2×len3) bytes
Table 17 binary data

1
Article Document File

rang divisi value expl


e on anat
ion
0x0000 LINK. Picture external file reference
bit 0 to 3 Type 0x0001 EMBEDDING. Include picture files
0x0002 STORAGE.Include OLE
0x0000 Follow default mode of storage
bit 4 to 5 com 0x0010 unconditional compression
pres 0x0020 no unconditional compression
sion
0x0000 still accessnever been
bit 8 to 9 situa 0x0100 Successful access and finding the file
tion 0x0200 access failederror condition
0x0300 Link access failed but ignored
Table 18 binary data attribute

2
Article Document File

4.2.4. font
Tag ID: HWPTAG_FACE_NAME
data type length expl
(bytes) anat
ion
BYTE One Properties (see Table 15)
WORD 2 fontname length (len1)
WCHAR array[len1] 2×len1 font name
BYTE One fallback fontType (see Table 16)
WORD 2 howfont name length (len2)
WCHAR array[len2] 2×len2 howfont name
BYTEarray[10] 10 font typeInformation (see Table 17)
WORD 2 basicFont name length (len3)
WCHAR array[len3] 2×len3 basicfont name
total length variable 18+ (2×len1) + (2×len2) + (2×len3) bytes
Table 19 Fonts

value expl
anat
ion
0x80 howfont presence
0x40 fontExistence of type information
0x20 basicfont presence
Table 20 Font Properties

value expl
anat
ion
0 When the original type is unknown
One truetypeFont (TTF)
2 WritingDedicated Fonts (HFT)
Table 21 Alternate Font Types

data length expl


type (bytes) anat
ion
BYTE One font family
BYTE One serif type
BYTE One thickness
BYTE One proportion
BYTE One contrast
BYTE One strokeDeviation
BYTE One stroke type
BYTE One letter type
BYTE One middle line
BYTE One X-height
Table 22 Font Type Information

2
Article Document File

4.2.5. border/background
Tag ID: HWPTAG_BORDER_FILL
data type length expl
(bytes) anat
ion
UINT16 2 Properties (see Table 24)
UINT8 array[4] 4 4 wayBorder line type (see Table 25)
UINT8 array[4] 4 4 wayBorder Line Thickness (see Table 26)
COLORREFarray[4] 16 4-way border line color.
UINT8 One Diagonal type (see table 27)
UINT8 One diagonal thickness
COLORREF 4 diagonal color
BYTE stream n Fill information (see Table 28)
total length variable 32+n bytes

Table 23 Border/Background Properties

range expl
anat
ion
bit 0 Presence or absence of 3D effect
bit 1 Presence or absence of shadow effect
SlashDiagonal shape (indicates each diagonal in a
clockwise direction) 000 : none
bit 2 to 010 : slash
4 011:LeftTop --> Bottom Edge
110 : LeftTop --> Right Edge
111 : LeftTop --> Bottom & Right Edge
BackSlashDiagonal shape (indicates each diagonal in a
counterclockwise direction) 000 : none
bit 5 to 010 : / back slash
7 011 : RightTop --> Bottom Edge
110 : RightTop --> Left Edge
111 : RightTop --> Bottom & Left Edge
bit 8 to Slashdiagonal line
9
bit 10 BackSlash Diagonal Line
bit 11 Slash DiagonalWhether the shape is rotated 180 degrees
bit 12 BackSlashWhether the diagonal shape is rotated 180 degrees
bit 13 With or without center line.
Table 24 Border/Background Properties

value expl
anat
ion
0 solid line
One long dotted line
2 dotted line
3 -.-.-.-.
4 -..-..-..
5 Repetition of line segments longer than Dash
6 Repeat of circles larger than Dot
7 double line
8 Thin line + Thick line Double line
9 thick line + thin line double line
10 thin line + thick line + thin line triple line
11 wave
12 wave doublet
13 thick 3d

2
Article Document File

14 thick 3D (light sourcethe opposite)


15 3D single line
16 3D single line (opposite light source)
Table 25 border line type

value expl value expl


anat anat
ion ion
0 0.1mm 8 0.6mm
One 0.12mm 9 0.7mm
2 0.15mm 10 1.0mm
3 0.2mm 11 1.5mm
4 0.25mm 12 2.0mm
5 0.3mm 13 3.0mm
6 0.4mm 14 4.0mm
7 0.5mm 15 5.0mm
Table 26 border line thickness

value expl
anat
ion
0 Slash
One BackSlash
2 CrookedSlash
graph 27 diagonaltype

2
Article Document File

data type length expl


(bytes) anat
ion
Fill type (type)
0x00000000 : No fill
UINT 4 0x00000001 : solid fill
0x00000002 : image fill
0x00000004 : Gradation fill
solid color fill (type & 0x0000001 !=0)
COLORREF 4 background color
COLORREF 4 pattern color
INT32 4 pattern type (table29)
gradation fill (type & 0x0000004 !=0)
INT16 2 gradation Type (Table 30reference)
INT16 2 of gradationTilt (start angle)
INT16 2 The horizontal center of the gradient (central X coordinate)
INT16 2 Vertical center of the gradient (central Y coordinate)
INT16 2 Degree of blurring of gradation (0 -100)
The number of colors in the gradient (num).(In
INT16 2
Wordian/Gul 2002/SE
It is always 2.)
INT32 4×num The location where the color changes. (only if num > 2)
COLORREF
array[num] 4×num color
image fill (type & 0x0000002 !=0)
BYTE One imageFill type (see Table 31)
BYTE stream 5 Figure information (table32)
If bit 0x0004 of type is onsize(=additional
DWORD 4 gradient bytes) = 1, otherwise size =0
BYTE One gradation spreadable center(0..100)
DWORD 4 Extra padding attribute length (size)
Additional fill properties
BYTE size - In case of gradation (type & 0x0000001 != 0)
smearCenter of precision (0 to 100): 1 byte
total length variable 8 + n bytes
graph 28 fillinformation

value expl
anat
ion
One - - --
2 |||||
3 \\\\\
4 /////
5 +++++
6 xxxx
graph 29 fill patterntype

value expl
anat
ion
One striped
2 circle
3 conical
4 Square
Table 30 Gradation Type

2
Article Document File

value expl
anat
ion
0 tiled -every
One tiled -horizontal/top
2 tiled -horizontal/bottom
3 tiled -vertical/left
4 tiled -vertical/right
5 fit to size
6 to the middle
7 up the middle
8 down the middle
9 left center
10 up left
11 down left
12 right center
13 up right
14 right down
15 NONE
Table 31 image fillcategory

data type length expl


(bytes) anat
ion
INT8 One brightness
INT8 One Contrast
picture effect
value expl
BYTE One anat
ion
0 REAL_PIC
One GRAY_SCALE
2 BLACK_WHITE
4 PATTERN8x8
UINT16 2 ID reference value of BinItem
total 5
length
Table 32 Figure Information

4.2.6. letter shape


Tag ID: HWPTAG_CHAR_SHAPE
data type length expl
(bytes) anat
ion
WORD array[7] 14 Font ID (FaceID) reference values by language (see Table 34)
UINT8 array[7] 7 by languageLong span, 50% to 200% (see Table 34)
INT8 array[7] 7 kerning by language,-50% to 50% (refer to Table 34)
UINT8 array[7] 7 Relative size by language, 10% to 250% (see Table 34)
INT8 array[7] 7 by languageCharacter position, -100% to 100% (refer to Table 34)
INT32 4 Standard size, 0pt~4096pt
UINT32 4 Properties (see Table 30)
INT8 One shadow spacing,-100%~100%
INT8 One shadow spacing,-100%~100%
COLORREF 4 text color
COLORREF 4 underline color
COLORREF 4 shading color
COLORREF 4 shadow color
UINT16 2 Character border/background ID (CharShapeBorderFill ID) reference
value (5.0.2.1 or later)
COLORREF 4 Strikethrough Color (5.0.3.0+)

2
Article Document File

total length 72
Table 33 Font Shape

2
Article Document File

value expl
anat
ion
0 korean
One english
2 chinese character
3 Japanese
4 etc
5 sign
6 user
graph 34 in the font Aboutlanguage

rang division value expl


e anat
ion
bit 0 italic
bit 1 bold or not
0 doesn't exist
bit 2 to 3 underscore type One under the letters
3 above the letters
bit 4 to 7 underscored (See Table 25)
0 doesn't exist
One solid line
bit 8 to 10 outline type 2 dotted line
3 Solid thick line (thick line)
4 Dashed line (long dotted
line)
5 dotted line(-.-.-.-.)
6 dotted line(-..-..)
0 doesn't exist
bit 11 to 12 shadow type One discontinuous
2 continuity
bit 13 embossed or not
bit 14 Engraving
bit 15 Superscript or not
bit 16 underSubscript or not
bit 17 Reserved.
bit 18-20 strikethrough
0 doesn't exist
One
knifėJeong ̇ Dong ̇ He ra ̇ Mi ̇
bit 21 to 24 type of emphasis Kang ̇ Jo ̇ Dot ̇
2
insidebeanD o n g ̊ G r a
̊ L a ̊ M i ̊
K a n g ̊ J o e ̊
D o t ̊
3 ˇ
4 ~
5 ・
6 :
bit 25 Whether to use spaces that match
the font
bit 26-29 strikethrough (See Table 25)
bit 30 Kerning or not

Table 35 Font Style Attributes

2
Article Document File

4.2.7. tab definition


Tag ID: HWPTAG_TAB_DEF

data type length (bytes) expl


anat
ion
UINT32 4 property
INT16 4 count
Tab information
(count number)
HPWUNIT 4 location of the tab
type of tab
value expl
UINT8 One anat
ion
0 left
One right
2 middle
3 decimal point
UINT8 One Fill type (see table 25)
UINT16 2 Reservation to fit 8 bytes
total length 8+(8×count)

Table 36 Tab Definition

range expl
anat
ion
bit 0 Existence of automatic tabs at the left end of paragraphs (automatic tabs for
outdenting)
bit 1 Existence of automatic tabbing at the right end of paragraphs
Table 37 Tab Definition Properties

4.2.8. paragraph number


Tag ID :HWPTAG_NUMBERING
data type length expl
(bytes) anat
ion
BYTE
stream 8 paragraph headInformation (see Table 39) Level (1 to
WORD 2 numberformat length (len) 7)
number format. Displays
Not used for bullet paragraphs. numbers
WCHAR 2×len string my specific to text control code (^)by attaching or letters
array[len]  Controls the format of the numbered paragraph head or
displayed in the text. symbols
^n : Displays the level path. (Example: 1.1.1.1.1.1.1) correspon
^N : Displays the level path, with an additional period at ding to
the end (e.g.1.1.1.1.1.1.1.) each level
see table 36)
UINT16 2 starting number
UINT 4 by levelStart number (5.0.2.5 or later) Level (1 to
7)
total variable (10+(2×len))×7 + 2 + (4×7) bytes
length
Table 38paragraph number

data type length expl


(bytes) anat
ion
UINT 4 Properties (see Table 40)

2
Article Document File

HWPUNIT16 2 width correction value


HWPUNIT16 2 distance from text
UINT 4 letterSee shape id

2
Article Document File

total length 8
Table 39 Paragraph Head Information

range divis value expl


ion anat
ion
0 left
bit 0 to 1 Paragraph Alignment Type One middle
2 right
Whether the width of the 0 false
bit 2 number depends on the One true
width of the actual
instance string.
0 false
bit 3 automaticoutdent
One true
0 Relative ratio to font size
bit 4 Kind of distance from text by level
One value
graph 40Paragraph head info attribute

value expl
anat
ion
0 One, 2,3
One circlehit 1, 2, 3
2 I, II, III
3 i, ii, iii
4 A, B,C
5 a, b,c
6 circleHit A, B, C
7 circlehit a, b, c
8 Ghana,all
9 circled go, me, da
10 available,do
11 Circled a, b, c
12 Days,three
13 One, two, three
14 Circled 一, 二,three
Table 41 Paragraph Number Format

4.2.9. bullet point


Tag ID: HWPTAG_BULLET
data type length expl
(bytes) anat
ion
BYTE stream 8 information in the paragraph head
WCHAR 2 bullet character
total length 10
Table 42 Bullets

4.2.10. Paragraphshape
Tag ID: HWPTAG_PARA_SHAPE
data type length expl
(bytes) anat
ion

3
Article Document File

UINT32 4 Attribute 1 (see Table 44)


INT32 4 left margin
INT32 4 right margin
INT32 4 in write/takewrite
INT32 4 Paragraphabove the gap
INT32 4 Paragraphbelow the gap
INT32 4 line spacing. Used in 2007 and earlier versions (below
version 5.0.2.5).
UINT16 2 Tab Definition ID (TabDef ID) Reference Value
Numbering ID or Bulleted Paragraph Appearance
UINT16 2 ID (Bullet ID) reference value
UINT16 2 Border/Background Shape ID (BorderFill ID) reference value
INT16 2 Paragraph border left spacing
INT16 2 Paragraph border right spacing
INT16 2 Space above paragraph border
INT16 2 Space below paragraph border
UINT32 4 Attribute 2 (see Table 40) (version 5.0.1.7 or higher)
UINT32 4 Property 3 (see Table 41) (version 5.0.2.5 or higher)
UINT32 4 Line spacing (version 5.0.2.5 or later)
total length 54

Table 43 Paragraph Shape

rang divis value expl


e ion anat
ion
0 By letter (%)
bit 0 to 1 Line spacing type. One fixed value
Used in versions older than
2 specify only margins
2007.
0 Justify
One Left align
bit 2 to 4 sorting method 2 right aligned
3 center aligned
4 distribution sort
5 division sort
0 word
bit 5 to 6 English unit by line break One hyphen
2 letter
0 Eojeol
bit 7 Korean unit based on line
One letter
division
bit 8 lines of editing paperWhether to
use a grid
bit 9 to 15 blank minimum 0% - 75%
bit 16 Lonely line protection
bit 17 nextwhether with a paragraph
bit 18 Paragraphprotected
bit 19 always before paragraphwhether
to share
0 font standard
bit 20-21 vertical alignment One topside
2 middle
3 under
bit 22 Line height appropriate for the font
0 doesn't exist
bit 23-24 Paragraphtype of hair One outline
2 number
3 bullet
bit 25-27 paragraph level Level 1 -
Level 7
bit 28 Paragraphborder connection

3
Article Document File

bit 29 ParagraphWhether to ignore


margins
bit 30 Paragraphtail shape
Table 44 Paragraph appearance properties 1

rang divis value expl


e ion anat
ion
bit 0~1 whether to enter in one line
bit 2~3 Reserved
bit 4 Hangeul DepartmentWhether to
automatically adjust English
spacing
bit 5 Hangeul DepartmentWhether to
automatically adjust number
spacing
Table 45 Paragraph Appearance Attribute 2

rang divis value expl


e ion anat
ion
0 according to the letter
bit 0-4 line spacing type One fixed value
2 specify only margins
3 Ieast
Table 46 Line Spacing Types

4.2.11. style (paragraphstyle)


Tag ID : HWPTAG_STYLE
data type length expl
(bytes) anat
ion
WORD 2 length (len1)
WCHARarray[len1] 2×len1 Local style name. Hangul style name in Hangul window
WORD 2 length (len2)
WCHARarray[len2] 2×len2 english style name
BYTE One Properties (see Table 43)
BYTE One next style id reference value
INT16 2 Language ID (see Table 48)
Paragraph shape ID reference value (paragraph shape ID attribute)
UINT16 2 Must be specified if the type of style is paragraph.
Text Shape ID (Text Shape ID attribute)
UINT16 2 Must be specified if the type of style is text.
total length variable 12+ (2×len1) + (2×len2) bytes
Table 47 Style

rang divis value expl


e ion anat
ion
0 paragraph style
bit 0 to 2 style type
One lettering style
graph 48 styletype

4.2.12. document random data


Is it a label document?Saves whether or not the information of
the print dialog box is saved. Tag ID:

3
Article Document File

HWPTAG_DOC_DATA

3
Article Document File

data type length expl


(bytes) anat
ion
ParameterSet variable Parameter set (see Table 50)
total length variable
graph 49 document randomdata

3
Article Document File

Item data is obtained as many as the number of parameter items.


data type length expl
(bytes) anat
ion
WORD 2 Parameter set ID
INT16 2 The number of items in the parameter set (n)
ParameterItem Variable × n parameter item (table 51reference)
total length variable 4 + (variable×n) bytes
Table 50 parameter set

data type length expl


(bytes) anat
ion
WORD 2 Parameter Item ID
WORD 2 Parameter Item Type (see Table 52)
ParameterItem
Type variable Parameter item data
total length variable 4 + variable bytes
Table 51 parameter item

value divis data type expl


ion anat
ion
0 PI_NULL UINT NULL
WORD string length (slen)
One PIT_BSTR
WCHAR array[len] string
2 PIT_I1 UINT INT8
3 PIT_I2 UINT INT16
4 PIT_I4 UINT INT32
5 PIT_I UINT INT
6 PIT_UI1 UINT UINT8
7 PIT_UI2 UINT UINT16
8 PIT_UI4 UINT UINT32
9 PIT_UI UINT UINT
0x8000 PIT_SET Parameter Set parameterthree
INT16 number of parameter sets
0x8001 PIT_ARRAY
ParameterArray array of parameter sets
0x8002 PIT_BINDATA UINT16 binary dataID
Table 52 Parameter item type

4.2.13. Document data for distribution


In documents for distribution, document data for distribution is included in all streams.
Tag ID: HWPTAG_DISTRIBUTE_DOC_DATA
data type length expl
(bytes) anat
ion
BYTE array[256] 256 Document data for distribution
total length
graph 53 for distribution documentdata

3
Article Document File

4.2.14. compatibledocument
Tag ID: HWPTAG_COMPATIBLE_DOCUMENT
data type length expl
(bytes) anat
ion
UINT32 4 Target program (see Table 55)
total length 4
Table 54 Compatible Documents

value expl
anat
ion
0 Post Documentation (Current Version)
One Written by 2007compatible document
2 MS Word compatible documents
Table 55 Target Program

4.2.15. layoutcompatibility
Tag ID: HWPTAG_LAYOUT_COMPATIBILITY
data type length expl
(bytes) anat
ion
UINT32 4 letterunit format
UINT32 4 Paragraphunit format
UINT32 4 areaunit format
UINT32 4 individualunit format
UINT32 4 fieldunit format
total 20
length
Table 56 layout compatibility

3
Article Document File

4.3. of 'text' datarecord


The data records used in the text are as follows.
Tag ID Value expl
anat
ion
HWPTAG_PARA_HEADER HWPTAG_BEGIN+50 paragraph header
HWPTAG_PARA_TEXT HWPTAG_BEGIN+51 the text of a paragraph
HWPTAG_PARA_CHAR_SHAPE HWPTAG_BEGIN+52 the shape of the text in a paragraph
HWPTAG_PARA_LINE_SEG HWPTAG_BEGIN+53 paragraph layout
HWPTAG_PARA_RANGE_TAG HWPTAG_BEGIN+54 area tags in paragraphs
HWPTAG_CTRL_HEADER HWPTAG_BEGIN+55 control header
HWPTAG_LIST_HEADER HWPTAG_BEGIN+56 paragraph list header
HWPTAG_PAGE_DEF HWPTAG_BEGIN+57 paper settings
HWPTAG_FOOTNOTE_SHAPE HWPTAG_BEGIN+58 footnote/endnoteshape
HWPTAG_PAGE_BORDER_FILL HWPTAG_BEGIN+59 side border/background
HWPTAG_SHAPE_COMPONENT HWPTAG_BEGIN+60 individual
HWPTAG_TABLE HWPTAG_BEGIN+61 table object
HWPTAG_SHAPE_COMPONENT_LINE HWPTAG_BEGIN+62 straight object
HWPTAG_SHAPE_COMPONENT_RECTANGLE HWPTAG_BEGIN+63 rectangle object
HWPTAG_SHAPE_COMPONENT_ELLIPSE HWPTAG_BEGIN+64 ellipse object
HWPTAG_SHAPE_COMPONENT_ARC HWPTAG_BEGIN+65 arc object
HWPTAG_SHAPE_COMPONENT_POLYGON HWPTAG_BEGIN+66 polygon object
HWPTAG_SHAPE_COMPONENT_CURVE HWPTAG_BEGIN+67 curve object
HWPTAG_SHAPE_COMPONENT_OLE HWPTAG_BEGIN+68 OLE object
HWPTAG_SHAPE_COMPONENT_PICTURE HWPTAG_BEGIN+69 figure object
HWPTAG_SHAPE_COMPONENT_CONTAINER HWPTAG_BEGIN+70 container object
HWPTAG_CTRL_DATA HWPTAG_BEGIN+71 control arbitrary data
HWPTAG_EQEDIT HWPTAG_BEGIN+72 formula object
RESERVED HWPTAG_BEGIN+73 reservation
HWPTAG_SHAPE_COMPONENT_TEXTART HWPTAG_BEGIN+74 nice writing
HWPTAG_FORM_OBJECT HWPTAG_BEGIN+75 form object
HWPTAG_MEMO_SHAPE HWPTAG_BEGIN+76 memo shape
HWPTAG_MEMO_LIST HWPTAG_BEGIN+77 memo list header
HWPTAG_CHART_DATA HWPTAG_BEGIN+79 chart data
HWPTAG_VIDEO_DATA HWPTAG_BEGIN+82 video data
HWPTAG_SHAPE_COMPONENT_UNKNOWN HWPTAG_BEGIN+99 Unknown

Table 57 data record in the body

4.3.1. Paragraph HeaderTag ID: HWPTAG_PARA_HEADER


data type length expl
(bytes) anat
ion
text(=chars)
UINT32 4 if (nchars & 0x80000000)
{nchars &= 0x7fffffff;
}
control mask (UINT32)
UINT32 4 (1<<ctrlch) combination
ctrlch refers to HwpCtrlAPI.Hwp 2.1 CtrlCh
UINT16 2 Paragraphshape id reference value
UINT8 One paragraph style id reference value
UINT8 One Column break type (see Table 59)
UINT16 2 letternumber of shape information

3
Article Document File

UINT16 2 number of range tag information


UINT16 2 Number of information about align for each line
UINT32 4 Paragraph Instance ID (unique ID)
UINT16 2 Whether change tracking merge paragraphs.(version
5.0.3.2 or higher)
total length 24
Table 58 Paragraph Headers

value expl
anat
ion
0x01 sectioning
0x02 multi-level division
0x04 page break
0x08 division
Table 59 Types of Column Breaks

If the number of texts is greater than 1, texts are loaded as many as the number of characters. Otherwise, paragraphs are
created with PARA_BREAK.

4.3.2. paragraphtext
Tag ID: HWPTAG_PARA_TEXT
data type length expl
(bytes) anat
ion
WCHAR array[sizeof(nchars)] 2×nchars number of characterstext
total length variable (2×nchars)byte
table 60paragraph text

A paragraph has at least one character shape buffer, and the first pos must be 0.
For example, if a paragraph with a character length of 40 characters is composed of 4 different character shapes of 10
characters each, the buffer isAs follows.

shapeOne shape2 shape3 shape4

m_Pos=0, m_ID=1 m_Pos=10, m_ID=2 m_Pos=20, m_ID=3 m_Pos=30,m_ID=4

Figure 45Paragraph Buffer Structure


Read text character Shape records as much as the number of character shape information (Character Shapes).

4.3.3. the shape of the text in a paragraph


Tag ID: HWPTAG_PARA_CHAR_SHAPE
data type length expl
(bytes) anat
ion
UINT32 4 The starting position at which the shape of the text changes
UINT32 4 lettershape id
total length variable 8×n
graph 61 paragraph lettershape

3
Article Document File

4.3.4. paragraphlayout
paragraphThis is the cache information used when outputting each line, and it is repeated as much as the
'number of information on align for each line' of the paragraph information.
Tag ID: HWPTAG_PARA_LINE_SEG
data type length expl
(bytes) anat
ion
UINT32 4 text start position
INT32 4 vertical position of the line
INT32 4 line height
INT32 4 height of text part
INT32 4 Distance from the vertical position of the line
to the baseline
INT32 4 line spacing
INT32 4 starting position in column
INT32 4 segment width
tag
-bit 0: whether it is the first line of the page
-bit 1: whether it is the first line of the column
-bit 16: whether the text is an unaligned
UINT32 4
empty segment
-bit 17: whether this is the first segment of a
line
-bit 18: whether this is the last segment of
the line
-bit 19: Whether auto-hyphenation is
performed at the end of the line.
-bit 20 : apply indentation
-bit 21 : apply paragraph header
-bit 31: property for convenience in
implementation
total length 36
graph 62 paragraphlayout

4.3.5. area tags in paragraphs


Read range tag information as much as the number of information. The range tag is used to mark a certain area of
text.Unlike letter shapes, each area can overlap each other (highlighter, correction marks, etc.)
Tag ID: HWPTAG_PARA_RANGE_TAG
data type length expl
(bytes) anat
ion
UINT32 4 area start
UINT32 4 zone end
tag (type+ data)
UINT32 4 :The upper 8 bits indicate the type, and the lower
24 bits indicate different types.
Represents any data that can be given a description.
total length variable 12×n
graph 63 paragraph areatag

4.3.6. controlheader
controlIf the character exists, the existing control information is created from the control character.

3
Article Document File

Tag ID: HWPTAG_CTRL_HEADER


data type length expl
(bytes) anat
ion
UINT32 4 control id

control idThe properties below are different


depending on the CtrlID. - each
control andobject reference
total length 4
graph 64 controlheader

4.3.7. paragraph list header


Tag ID: HWPTAG_LIST_HEADER
data type length expl
(bytes) anat
ion
INT16 2 number of paragraphs
property
range divis value expl
ion anat
UINT32 4 ion
0 width
bit 0 to 2 text direction One length
0 Normallyline break
bit 3 to 4 line breaks in One Maintain one line by manipulating
paragraphs tracking
2 Width increases according to
content
0 top
bit 5 to 6 vertical One center
alignment 2 bottom
total 6
length
graph 65 Paragraph Listheader

4.3.8. control randomdata


Stores the field name or hyperlink information of the control.
Tag ID: HWPTAG_CTRL_DATA
data type length expl
(bytes) anat
ion
ParameterSet variable Parameter set (see Table 50)
total length variable
Table 66 control arbitrary data

4.3.9. individual common properties including control (objectcontrol)


An extended type control has a 32-bit ID as an identifier representing the type.used If the control code is an
identification symbol representing a large category, the control ID is an identification symbol
representing a subclass.
For example, a single control ID is defined in the form of MAKE_4CHID('c', 'o', 'l', 'd').
MAKE_4CHID(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))

4
Article Document File

control id object object element


common properties
properties
One graph MAKE_4CHID('t','b', 'l', ' ') √
( drawing
object) MAKE_4CHID('$','l', 'i', 'n')
2 line MAKE_4CHID('$', 'r','e', 'c') √ √
rectan MAKE_4CHID('$','e','l', 'l')
gle MAKE_4CHID('$', 'a', 'r', 'c')
ellipse MAKE_4CHID('$','p', 'o', 'l')
arc MAKE_4CHID('$','c', 'u', 'r')
polygo
n
curve
3 Article 97 MAKE_4CHID('e','q', 'e', 'd') √
Formula
4 painting MAKE_4CHID('$','p', 'i', 'c') √ √
5 OLE MAKE_4CHID('$','o', 'l', 'e') √ √
6 bundle object MAKE_4CHID('$','c', 'o', 'n') √ √
Table 67 Controls and Control IDs with Object
Common Properties

data type length expl


(bytes) anat
ion
BYTE stream 36 object commonProperties (see Table 69)
BYTE stream n Caption list information is obtained if there is caption information (see
Table 71)
total length variable 36+n bytes
Table 68 Object Common Attributes

data type length expl


(bytes) anat
ion
UINT32 4 ctrl ID
UINT32 4 Properties (see Table 70)
HWPUNIT 4 vertical offset value
HWPUNIT 4 horizontal offset value
HWPUNIT 4 width object's width
HWPUNIT 4 height the height of the object
INT32 4 z-order
HWPUNIT16
array[4] 2×4 The outer 4-way margin of the object
UINT32 4 each in the documentUnique ID for the object (instance
ID)
INT32 4 Page break prevention on(1) / off(0)
WORD 2 individualComment character length (len)
WCHAR array[len] 2×len object description text
total length variable 46 + (2×len) bytes
Table 69 Object Common Attributes

range divis value expl


ion anat
ion
bit 0 Whether to treat it like a
letter
bit 1 reservation
affect line spacing
bit 2 whether to give
0 paper
bit 3 to 4 Reference of One page
vertical position
(VertRelTo) 2 para
VerRelTo is 'paper' or 'page'top,
0 otherwise left
Arrangement One VerRelTo is 'paper' or 'page'back side center

4
Article Document File

bit 5 to 7 method relative to VerRelTo is 'paper' or 'page'bottom,


the standard of 2 otherwise right
vertical position
3 VerRelTo is 'paper' or 'page'inside
4 VerRelTo is 'paper' or 'page'outside
bit 8 to 9 standard for horizontal 0 page
position

4
Article Document File

One page
(HorzRelTo) 2 column
3 para
for HorzRelTo
bit 10 to relative ordering Refer to bit 5 to 7
12
VertRelTo is 0 off
bit 13 'para'the vertical
position of the
object as the body One on
area
whether to
limitWhether
Allow overlap with
other objects Whenever an object's position is constrained to the body
bit 14 areaconsider it false
Whether
0 paper
One page
bit 15 to standard for object width 2 coloum
17
3 para
4 absolute
0 paper
bit 18 to standard for object height One page
19 2 absolute
VertRelTo is 0 off
bit 20 paraWhen size One on
protection or not
object around text is how will flow to designateoption
Square 0 along the bound rect
bit 21 to Tight One along the outline of the object
23 Through 2 to the empty space inside the object
TopAndBottom 3 left,Do not place text on right
BehindText 4 writing andOverlap to the back of the text
InFrontOfText 5 writing andOverlap to the front of the text
0 BothSides
Left/Right of the
bit 24-25 objectOption to One LeftOnly
specify whether text 2 RightOnly
is placed on the 3 LargestOnly
page
0 none
to which
bit 26-28 object this One figure
belongsnumber 2 table
category 3 equation

table 70 individual common attributeproperty

data type length expl


(bytes) anat
ion
BYTE stream n Paragraph list header (see Table 65)
BYTE stream 12 Caption (see Table 67)
total length variable 12+n bytes
Table 71caption list

data type length expl


(bytes) anat
ion
UINT 4 Properties (see Table 73)
HWPUNIT 4 Caption Width (only for portrait orientation)
HWPUNIT16 2 between caption and frameinterval
HWPUNIT 4 The maximum length of the text (= width of the object)
total length 14
Table 72 Caption

4
Article Document File

rang division value expl


e anat
ion
0 left
bit 0 to 1 direction One right
2 top
3 bottom
bit 2 Whether to include margins in Use only in landscape orientation
caption width
Table 73 Caption Properties

4.3.9.1.table object
Tag ID: HWPTAG_TABLE
data type length expl
(bytes) anat
ion
BYTE stream n object commonProperties (see Table 68)
BYTE stream n2 Table Object Properties (Table 75reference)
Cell list (see Table 79)
BYTE stream n3 cell size × number of cells.
total length variable n + n2 + n3
Table 74 Table object

data type length expl


(bytes) anat
ion
UINT32 4 property
UINT16 2 RowCount
UINT16 2 nCols
HWPUNIT16 2 CellSpacing
BYTE stream 8 paddingInformation (see Table 77)
BYTE stream 2×n Row Size
UINT16 2 Border FillID
UINT16 2 Valid Zone Info Size (5.0.1.0more)
BYTE stream 10×n areaProperties (see Table 73) (5.0.1.0 and later)
total length variable 22 + (2×row) + (10×zone)

Table 75 Table object properties

range divis value expl


ion anat
ion
0 not divided
bit 0-1 Dividing at Page One Divide by cell
Boundaries 2 not divided
Auto-repeat subject
bit 2
line
Whether
Table 76 Attributes of Table Attributes

data type length expl


(bytes) anat
ion
HWPUNIT16 2 left margin
HWPUNIT16 2 right margin
HWPUNIT16 2 top margin

4
Article Document File

HWPUNIT16 2 bottom margin


total length 8
Table 77 Padding Information

4
Article Document File

data type length expl


(bytes) anat
ion
UINT16 2 start column address
UINT16 2 start line address
UINT16 2 end column address
UINT16 2 end row address
UINT16 2 Border Fill ID
total length 10
Table 78 Realm Attributes

data type length expl


(bytes) anat
ion
BYTE stream n Paragraph list header (see Table 65)
BYTE stream 26 Cell Properties (Table 80reference)
total length variable 26+n bytes
Table 79 Cell List

data type length expl


(bytes) anat
ion
UINT16 2 Cell Address (Column, TopThe left cell starts at 0 and
increments by 1)
UINT16 2 Cell address (Row, the top cell starts from 0 and increases by
1)
UINT16 2 thermalmerge count
UINT16 2 in linemerge count
HWPUNIT 4 cell width
HWPUNIT 4 cell height
HWPUNIT16array[4] 2×4 cell 4-way margin
UINT16 2 border/backgroundid
total length 26
Table 80 Cell Properties

4.3.9.2. Drawing objects (lines, rectangles, ellipses, arcs, polygons, curves)


everyFor serialization of a drawing object, the common properties of the drawing object, which is
the base, are first serialized, and then the object element properties that it has are serialized.

data type length expl


(bytes) anat
ion
BYTE stream n object elementProperties (see Table 82)
BYTE stream 11 border lineInformation (see Table 86)
BYTE stream n2 Fill information (see Table 28)
BYTE stream 12 If there is a text box property, the text box list information is obtained.
total length variable 23 + n + n2 bytes
graph 81 drawing individual commonproperty

4.3.9.2.1. object element


Tag ID : HWPTAG_SHAPE_COMPONENT(GenShapeObject case id is two th recordbeing)
data type length expl
(bytes) anat
ion

4
Article Document File

UINT32 4 object control id


total length 4
Table 82 Object Element Properties

data type length expl


(bytes) anat
ion
INT32 4 X offset within the group to which the object belongs
INT32 4 Y offset within the group to which the object belongs
WORD 2 how many timeswhether it was a group
WORD 2 local file version of object element
UINT32 4 Initial width at object creation
UINT32 4 Initial height at object creation
UINT32 4 object's current width
UINT32 4 object's current height
property
UINT32 4 value expl
anat
ion
0 horz flip
One vert flip
HWPUNIT16 2 angle of rotation
INT32 4 x-coordinate of center of rotation (object coordinate system)
INT32 4 rotationaly coordinate (object coordinate system)
n Rendering information (Table 79reference)
total length variable 42+n bytes

Table 83 Object Element Properties

data type length expl


(bytes) anat
ion
The number of scale matrix and rotation matrix pairs
WORD 2 (cnt)
Initially 1, incremented by one each time grouping, ungrouping
Wheneverdecrease by one
BYTE stream 48 translation matrix (see Table 85)
BYTE stream cnt×48×2 scalematrix/rotration matrix sequence (see Table
85)
total length variable 50+(cnt×48×2) bytes
Table 84 Renderinginformation

each matrixIt is implemented as a 3 X 3 matrix in which elements are represented by doubles. Since
the last row is always 0, 0, 1, the last row is omitted in actual serialization. The stored information
is as follows.
data type length expl
(bytes) anat
ion
double array[6] 8×6 Elements of a 3 X 2 matrix
total length 48
Table 85 matrix information

data type length expl


(bytes) anat
ion
COLORREF 4 line color
INT16 2 line thickness
UINT32 4 Properties (see Table 87)
BYTE One Outline style (refer to Table 88)

4
Article Document File

total length 11
Table 86 Border Line Information

4
Article Document File

rang divis value expl


e ion anat
ion
bit 0 to 5 line type
0 round Defaults to "Round" for
bit 6 to 9 line end shape pictures and "Flat" for
One flat
drawing objects.
bit 10 to 15 arrow start shape
0 no shape
One arrow shape
2 concave arrow shape
bit 16 to 21 arrow tip shape 3 hollow diamond shape
4 hollow circle shape
5 hollow square shape
6 diamond shape
7 filled circleshape
8 deceivefilled square shape
bit 22 to 25 arrow start size
0 small-small
One small-middle
2 small-big
bit 26-29 arrow tip size 3 middle-small
4 middle-middle
5 middle-big
6 big-small
7 big-middle
8 big-middle
bit 30 Whether to fill the arrow at the
beginning
bit 31 Whether to fill the arrow at the
end
graph 87 border line informationproperty

value expl
anat
ion
0 normal
One outer
2 inner
Table 88 Outline style

data type length expl


(bytes) anat
ion
BYTE stream 12 Text properties for drawing object text boxes (see Table 90)
BYTE stream n Paragraph list header (see Table 65)
total length variable 12+n bytes
Table 89 Text information for drawing object text boxes

data type length expl


(bytes) anat
ion
HWPUNIT16 2 Text box text margin left
HWPUNIT16 2 textbox text right margin
HWPUNIT16 2 Text box text top margin
HWPUNIT16 2 Text box text bottom margin
max width of text string
HWPUNIT 4 (usually equal to the horizontal size of the drawing object)

4
Article Document File

total length 12
Table 90 Text Properties for Drawing Object Text Boxes

4.3.9.2.2. line object

5
Article Document File

data type length expl


(bytes) anat
ion
BYTE stream n object commonProperties (see Table 68)
BYTE stream n2 Drawing object common properties (see Table 81)
BYTE stream 18 Line object properties (Table 92reference)
total length variable 18 + n + n2 bytes
Table 91 Line object

Tag ID : HWPTAG_SHAPE_COMPONENT_LINE
data type length expl
(bytes) anat
ion
INT32 4 starting point X coordinate
INT32 4 starting point Y coordinate
INT32 4 end point X coordinate
INT32 4 end point Y coordinate
property.
UINT16 2 When first created, whether vertical or horizontal, the direction
of the line is alwaysDue to the phenomenon caused by the
gripping to the right (upward), direction right
A flag to catch.
total length 18
Table 92 Line object properties

4.3.9.2.3. Squareindividual
data type length expl
(bytes) anat
ion
BYTE stream n object commonProperties (see Table 68)
BYTE stream n2 Drawing object common properties (see Table 81)
BYTE stream 33 Rectangle object properties (see Table 94)
total length variable 33 + n + n2 bytes
graph 93 Squareindividual

Tag ID: HWPTAG_SHAPE_COMPONENT_RECTANGLE


data type length expl
(bytes) anat
ion
Square corner curvature (%) 0 for right angles, 20 for round
BYTE One
shapes, and 20 for semicircles
50, others are suitableValues are used in % units.
INT32 array[4] 4×4 Coordinates of the rectangle (x)
INT32 array[4] 4×4 Coordinates of the rectangle (y)
total length 33
graph 94 Square individualproperty

4.3.9.2.4. ellipse object


data type length expl
(bytes) anat
ion
BYTE stream n object commonProperties (see Table 68)
BYTE stream n2 Drawing object common properties (see Table 81)
BYTE stream 60 ellipse objectProperties (see Table 96)
total length variable 60 + n + n2 bytes

Table 95 Ellipse objects

5
Article Document File

Tag ID: HWPTAG_SHAPE_COMPONENT_ELLIPSE

5
Article Document File

data type length expl


(bytes) anat
ion
UINT32 4 Properties (see Table 97)
INT32 4 X value of center coordinate
INT32 4 Y value of center coordinate
INT32 4 1st axis X coordinate value
INT32 4 1st axis Y coordinate value
INT32 4 2nd axis X coordinate value
INT32 4 2nd axis Y coordinate value
INT32 4 start pos x
INT32 4 start pos y
INT32 4 end pos x
INT32 4 end pos y
start pos x2
INT32 4 interval of curve (effective only when it is an arc)
INT32 4 start pos y2
INT32 4 end pos x 2
INT32 4 end pos y2
total 60
length
Table 96 Ellipse object properties

rang expl
e anat
ion
Whether the interval needs to be recalculated when it is changed to an arc (ARC)
bit 0 (interval - distance between two points on a circle)
bit 1 Whether it has been changed to ARC
bit 2 to 9 arctype
Table 97 Properties of Ellipse/Arc Object Properties

5
Article Document File

4.3.9.2.5. polygonindividual
data type length expl
(bytes) anat
ion
BYTE stream n object commonProperties (see Table 68)
BYTE stream n2 Drawing object common properties (see Table 81)
BYTE stream n3 Polygon object properties (see Table 99)
total length variable n + n2 + n3 bytes
graph 98 polygonindividual

Tag ID: HWPTAG_SHAPE_COMPONENT_POLYGON


data type length expl
(bytes) anat
ion
INT16 2 count of points (cnt)
INT32 array[cnt] 4×cnt x coordinate
INT32 array[cnt] 4×cnt y-coordinate
total length variable 2 + 2 (4×cnt) bytes
graph 99 polygon individualproperty

4.3.9.2.6. arc object


data type length expl
(bytes) anat
ion
BYTE stream n object commonProperties (see Table 68)
BYTE stream n2 Drawing object common properties (see Table 81)
BYTE stream 28 Arc object properties (Table 96reference)
total length variable 28 + n + n2 bytes
Table No. 100 object

Tag ID: HWPTAG_SHAPE_COMPONENT_ARC


data type length expl
(bytes) anat
ion
UINT32 4 Properties (see Table 92)
INT32 4 The X value of the center coordinate of the ellipse
INT32 4 Y value of the center coordinate of the ellipse
INT32 4 1st axis X coordinate value
INT32 4 1st axis Y coordinate value
INT32 4 2nd axis X coordinate value
INT32 4 2nd axis Y coordinate value
total length 28
Table 101 arc object properties

4.3.9.2.7. curve object


data type length expl
(bytes) anat
ion
BYTE stream n object commonProperties (see Table 68)
BYTE stream n2 Drawing object common properties (see Table 81)
BYTE stream n3 Curve object properties (see Table 103)
total length variable n + n2 + n3 bytes
graph 102 curveindividual

5
Article Document File

Tag ID: HWPTAG_SHAPE_COMPONENT_CURVE


data type length expl
(bytes) anat
ion
INT16 2 count of points (cnt)
INT32 array[cnt] 4×cnt x coordinate
INT32 array[cnt] 4×cnt y-coordinate
BYTEarray[cnt-1] cnt-One segment type (0: line, 1: curve)
total length variable 2 + 2(4×cnt) + cnt-1 bytes
graph 103 curve individualproperty

4.3.9.3. Text formula object


data type length expl
(bytes) anat
ion
BYTE stream n object commonProperties (see Table 68)
BYTE stream n2 Formula object properties (see Table 105)
total length variable n + n2 bytes
graph 104 formulaindividual

Tag ID: HWPTAG_EQEDIT


data type length expl
(bytes) anat
ion
property.
UINT32 4 The scope occupied by the script.
firstLine-by-line if bit is on, character-by-character
if off.
WORD 2 script length (len)
WCHAR array[len] 2×len Post Formula Script (*)
HWPUNIT 4 formulafont size
COLORREF 4 text color
INT16 2 base line
total length variable 16 + (2×len) bytes
graph 105 formula individualproperty

* The text formula script is compatible with EQN script, and detailed specifications are added later

4.3.9.4. paintingObject (HWPTAG_SHAPE_COMPONENT_PICTURE)


data type length expl
(bytes) anat
ion
BYTE stream n object commonProperties (see Table 68)
BYTE stream n2 object elementCommon properties (see Table 80)
BYTE stream n3 Picture object properties (see Table 107)
total length variable n + n2 + n3 bytes
graph 106 paintingindividual

data type length expl


(bytes) anat
ion
COLORREF 4 border color
INT32 4 border thickness
UINT32 4 Border properties (see Table 86)

5
Article Document File

INT32 array[4] 4×4 x-coordinate of the image's border rectangle (size when the picture
was first inserted)
INT32 array[4] 4×4 The y-coordinate of the image's border rectangle (size when the
picture was first inserted)
INT32 4 left side of the rectangle after cropping
INT32 4 Top of the rectangle after cropping
INT32 4 Right of the rectangle after cropping
INT32 4 The bottom of the rectangle after cropping
paddingInformation (see Table 72)
BYTE stream 8 table (default: 141), picture (default: 0)
BYTE stream 5 Figure information (see Table 27)
BYTE One border transparency
UINT32 4 documentA unique ID (instance ID) for each object within
BYTE stream n paintingeffect information
total length variable 78 + n bytes
graph 107 painting individualproperty

data type length expl


(bytes) anat
ion
UINT32 4 About Picture Effects (Shadow, Glow, Soft Edge,
Reflection)
BYTE stream n Each effect information (Table 109 ~ Table 113reference)
total length variable 4 + n bytes
graph 108 painting effectproperty

data type length expl


(bytes) anat
ion
INT32 4 shadow style
float 4 shadow transparency
float 4 blur the shadows
float 4 direction
float 4 distance
INT32 4 Sort
float 4 Tilt angle (X)
float 4 Tilt angle (Y)
float 4 Magnification Ratio (X)
float 4 Magnification Ratio (Y)
INT32 4 Rotate the shadow with the shape
BYTE stream n Shadow color (see Table 113)
total length variable 44 + n bytes
Table 109 shadow effectproperty

data type length expl


(bytes) anat
ion
float 4 neon transparency
float 4 neon radius
BYTE stream n Neon colors (( 113reference)
total length variable 8 + n bytes
graph 110 neon effectproperty

data type length expl


(bytes) anat

5
Article Document File

ion

5
Article Document File

float 4 soft edgeradius


total length 4
Table 111 Soft Edge Effect Properties

data type length expl


(bytes) anat
ion
INT32 4 reflective style
float 4 radius
float 4 direction
float 4 distance
float 4 Tilt angle (X)
float 4 Tilt angle (Y)
float 4 Magnification Ratio (X)
float 4 Magnification Ratio (Y)
INT32 4 rotation style
float 4 starting transparency
float 4 starting position
float 4 end transparency
float 4 end position
float 4 offset direction
total length 53

graph 112 reflect effectproperty

data type length expl


(bytes) anat
ion
INT32 4 color type
UINT32 4 RGB (0x00rrggbb)
UINT32 4 CMYK (0xccmmyykk)
INT32 4 schema type
INT32 4 system type
INT32 4 preset type
float 4 ScR
float 4 ScG
float 4 ScB
float 4 H
float 4 S
float 4 L
UINT32 4 colornumber of effects
BYTE array[n] 8×n Color effect (see Table 111)
total length variable 4 + m(4 to 12) + n bytes
graph 113 colorproperty

data type length mea


(bytes) ning
INT32 4 Color Effect Type (see Table 115)
float 4 coloreffect value
total length 8
graph 114 color effectproperty

value expl
anat
ion
0 alpha

5
Article Document File

One alpha_mod
2 alpha_off
3 red
4 red_mod
5 red_off
6 green
7 green_mod
8 green_off
9 blue
10 blue_mod
11 blue_off
12 hue
13 hue_mod
14 hue_off
15 sat
16 sat_mod
17 sat_off
18 lum
19 lum_mod
20 lum_off
21 shade
22 tint
23 gray
24 comp
25 gamma
26 inv_gamma
27 inv
graph 115 color effecttype

4.3.9.5.OLE object (HWPTAG_SHAPE_COMPONENT_OLE)


data type length expl
(bytes) anat
ion
BYTE stream n object commonProperties (see Table 68)
BYTE stream 24 OLE object properties (see Table 117)
total length variable 24 + n bytes
Table 116 OLE objects

data length expl


type (bytes) anat
ion
UINT16 2 Properties (see Table 118)
INT32 4 size x extent of the object itself
INT32 4 The extent y size of the object itself
UINT16 2 BinData ID of the storage used by the object
COLORREF 4 border color
INT32 4 border thickness
UINT32 4 Border properties (see Table 87)
total length 24
Table 117 OLE object properties

rang divis value expl


e ion anat
ion

5
Article Document File

DVASPECT_CONTENT =One,
bit 0 to 7 DVASPECT_THUMBNAIL =2,
DVASPECT_ICON =4,
DVASPECT_DOCPRINT =8
bit 8 TRUE if moniker is assigned
baseline. 0 means default (85%), and 1~101 represents
bit 9 to 15 0~100%. Currently, only the formula
have a separate
0 Unknown
One Embedded
bit 16 to 21 object type
2 Link
3 Static
4 Equation
graph 118Properties of OLE object properties

For detailed description of bit 0-7See MSDN MFC


COleClientItem::m_nDrawAspect

For a detailed explanation of bit 8, refer to


MSDN.MFC COleClientItem::m_bMoniker

4.3.9.6. bundleObject (HWPTAG_SHAPE_COMPONENT_CONTAINER)


data type length expl
(bytes) anat
ion
BYTE stream n object commonProperties (see Table 68)
BYTE stream n2 Bundle object properties (see Table 120)
Object property x Number of bundled objects.
BYTE stream n3 (Bundable objects: drawing objects, OLE, pictures,bundle
object)
total length variable n + n2 + n3 bytes
graph 119 bundleindividual

data type length expl


(bytes) anat
ion
WORD 2 Number of objects (n)
UINT32 array[n] 4×n object's control IDarray
total length variable 2 + (4×n)byte
graph 120 bundle individualproperty

4.3.10. non-object controls

6
Article Document File

meaning control id paragraph file tag


list
One zone definition MAKE_4CHID('s','e', 'c', 'd') √
2 only definition MAKE_4CHID('c','o', 'l', 'd')
MAKE_4CHID('h','e', 'a', 'd') /
3 Header / Footer MAKE_4CHID('f','o', 'o', 't') √
MAKE_4CHID('f', 'n', ' ', ' ') /
4 footnote / endnote MAKE_4CHID('e','n', ' ', ' ') √
with
5 automatic number MAKE_4CHID('a','t', 'n', 'o') HWPTAG_CTRL_HEAD
6 new numbering MAKE_4CHID('n','w', 'n', 'o') start with ctrlidEach
7 hide MAKE_4CHID('p','g', 'h', 'd') object can be
8 odd/even adjustment MAKE_4CHID('p','g', 'c','t') checked.
9 page number MAKE_4CHID('p','g', 'n', 'p')
location
10 Browsemark MAKE_4CHID('i','d', 'x', 'm')
11 bookmark MAKE_4CHID('b', 'o', 'k', 'm')
12 letter overlap MAKE_4CHID('t','c', 'p', 's')
13 rubbish MAKE_4CHID('t','d', 'u', 't')
14 hidden explanation MAKE_4CHID('t','c', 'm', 't') √
15 field start field control id
Table 121 Non-object controls and control IDs

Certain controls can have a list of paragraphs in addition to information.

control id
FIELD_UNKNOWN MAKE_4CHID('%', 'u', 'n', 'k')
FIELD_DATE MAKE_4CHID('%','d', 't', 'e')
FIELD_DOCDATE MAKE_4CHID('%','d', 'd','t')
FIELD_PATH MAKE_4CHID('%','p', 'a', 't')
FIELD_BOOKMARK MAKE_4CHID('%','b', 'm', 'k')
FIELD_MAILMERGE MAKE_4CHID('%','m', 'm', 'g')
FIELD_CROSSREF MAKE_4CHID('%','x', 'r', 'f')
FIELD_FORMULA MAKE_4CHID('%','f', 'm', 'u')
FIELD_CLICKHERE MAKE_4CHID('%','c', 'l', 'k')
FIELD_SUMMARY MAKE_4CHID('%','s', 'm', 'r')
FIELD_USERINFO MAKE_4CHID('%', 'u', 's', 'r')
FIELD_HYPERLINK MAKE_4CHID('%', 'h', 'l', 'k')
FIELD_REVISION_SIGN MAKE_4CHID('%','s', 'i', 'g')
FIELD_REVISION_DELETE MAKE_4CHID('%','%', '*', 'd')
FIELD_REVISION_ATTACH MAKE_4CHID('%','%', '*', 'a')
FIELD_REVISION_CLIPPING MAKE_4CHID('%','%', '*', 'C')
FIELD_REVISION_SAWTOOTH MAKE_4CHID('%','%', '*', 'S')
FIELD_REVISION_THINKING MAKE_4CHID('%','%', '*', 'T')
FIELD_REVISION_PRAISE MAKE_4CHID('%','%', '*', 'P')
FIELD_REVISION_LINE MAKE_4CHID('%','%', '*', 'L')
FIELD_REVISION_SIMPLECHANGE MAKE_4CHID('%','%', '*', 'c')
FIELD_REVISION_HYPERLINK MAKE_4CHID('%','%', '*', 'h')
FIELD_REVISION_LINEATTACH MAKE_4CHID('%','%', '*', 'A')
FIELD_REVISION_LINELINK MAKE_4CHID('%','%', '*', 'i')
FIELD_REVISION_LINETRANSFER MAKE_4CHID('%','%', '*', 't')
FIELD_REVISION_RIGHTMOVE MAKE_4CHID('%','%', '*', 'r')
FIELD_REVISION_LEFTMOVE MAKE_4CHID('%','%', '*', 'l')
FIELD_REVISION_TRANSFER MAKE_4CHID('%','%', '*', 'n')
FIELD_REVISION_SIMPLEINSERT MAKE_4CHID('%','%', '*', 'e')

6
Article Document File

FIELD_REVISION_SPLIT MAKE_4CHID('%','s','p', 'l')


FIELD_REVISION_CHANGE MAKE_4CHID('%','%', 'm','r')
FIELD_MEMO MAKE_4CHID('%','%', 'm','e')
FIELD_PRIVATE_INFO_SECURITY MAKE_4CHID('%','c', 'p', 'r')
Table 122 field controlID

4.3.10.1. zone definition


data type length expl
(bytes) anat
ion
UINT32 4 Properties (Table 124reference)
HWPUNIT16 2 Spacing between different columns on the same page
Whether to align vertically
HWPUNIT16 2 0 = off, 1 - n = specify interval in HWPUNIT units
Whether to align horizontally
HWPUNIT16 2 0 = off, 1 - n = specify interval in HWPUNIT units
HWPUNIT 4 Default tab spacing (hwpunit or relative characters)
UINT16 2 numberParagraph shape ID
UINT16 2 page number (0 = following previous section, n = starting with
any number)
figure, table, formula number (0 =Following the previous
UINT16 array[3] 2×3
section, n = any number
start)
Representative Language (Language valueno (==0),specified
UINT16 2
in the application
Language)5.0.1.5 or later
total length 26
child record length expl
data type
(bytes) anat
ion
BYTE stream 40 paper settings information (table 125reference)
BYTE stream 26 Footnote shape information (see Table 127)
BYTE stream 26 Endnote shape information (see Table 127)
BYTE stream 12 Page border/background information (see Table 129)
sheepIf there is the main page content of the page, odd
BYTE stream 10
page, or even page, the background page information is
displayed.
get base side Information is Paragraph list contains (table
131reference)
total length 140

graph 123 areaJustice

rang expl
e anat
ion
bit 0 Whether to hide headers
bit 1 Whether to hide footers
bit 2 Whether or not to hide the background
bit 3 Whether to hide borders
bit 4 Whether to hide the background
bit 5 Whether to hide the page number position
bit 8 Whether to display borders only on the first page of the section
bit 9 Whether to show the background only on the first page of the section
bit 16 to 18 Text orientation (0: horizontal 1: vertical)
bit 19 Whether to hide blank lines
bit 20-21 Whether to apply the page number when a new page is created by sectioning
bit 22 Whether or not the Manuscript Ethics Act is applied
graph 124 area Justiceproperty

4.3.10.1.1. paper settings

6
Article Document File

Tag ID: HWPTAG_PAGE_DEF

6
Article Document File

data type length expl


(bytes) anat
ion
HWPUNIT 4 paperhorizontal size
HWPUNIT 4 papervertical size
HWPUNIT 4 paperleft margin
HWPUNIT 4 right margin
HWPUNIT 4 top margin
HWPUNIT 4 bottom margin
HWPUNIT 4 header margin
HWPUNIT 4 footer margin
HWPUNIT 4 binding margin
UINT32 4 Properties (Table 126reference)
total length 40
graph 125 papersetting

rang divis value expl


e ion anat
ion
0 narrowly
bit 0 paper
One widely
orientation
0 edit one side
bit 1 to 2 binding method One edit opposite
2 flip up
graph 126 paper settingproperty

6
Article Document File

4.3.10.1.2. footnote/endnote shape


Tag ID: HWPTAG_FOOTNOTE_SHAPE
data type length expl
(bytes) anat
ion
UINT32 4 Properties (see Table 128)
WCHAR 2 user symbol
WCHAR 2 front letter
WCHAR 2 back decoration letter
UINT16 2 starting number
HWPUNIT16 2 divider length
HWPUNIT16 2 contourtop margin
HWPUNIT16 2 margin below divider
HWPUNIT16 2 annotationspace between
UINT8 One contour Type (border/background border line typereference)
UINT8 One contour thickness (border/background border line
thicknessreference)
CORORREF 4 contour color (of border/background border line colorreference)
total length 26
Table 127 Footnote/Endnote Shapes

rang division value expl


e 0 One, 2,3 anat
One circlehit 1, 2, 3
2 I, II, III
3 i, ii, iii
4 A, B,C
5 a, b,c
6 circleHit A, B, C
number 7 circlehit a, b, c
0~16 are
shape. 8 Ghana,all
general is
0x80;0x81 9 circled go, me, da
bit 0 to 7
footnote/ 10 available,do
endnote
private 11 Circled a, b, c
12 Days,three
13 One, two,three
14 Circled 1, 2, 3
15 the former, second, party, affection, radish, energy,
16 kyung,
甲, 乙, god,
丙, 丁,lim,total
戊, 己, 庚, 辛, 壬,癸
0x80 4 letters repeated in sequence
0x81 Repeat custom character
0 (Footnotecase) arranged separately for each stage
one page
One (in case of footnote) throughArrangement
footnote within 2 (For footnotes) Arranged in the rightmost column
bit 8 to 9 in multiple
steps
how to position 0 (Americans case) of the documentlast
One (Americans case) zonelast
0 following the previous area
bit 10 to numbering One Start over from the current area
11 2 on each side New start (footnoteprivate)
bit 12 Whether to set the shape of the number code in the footnote in superscript format
bit 13 Whether to output immediately after text

Table 128 Footnote/Endnote Appearance Properties

6
Article Document File

4.3.10.1.3. side border/background


Tag ID: HWPTAG_PAGE_BORDER_FILL
data type length expl
(bytes) anat
ion
UINT 4 Properties (see Table 130)
HWPUNIT16 2 Border/Background Position Left Spacing
HWPUNIT16 2 border/background location rightinterval
HWPUNIT16 2 Border/Background Position Top Spacing
HWPUNIT16 2 border/background location downinterval
UINT16 2 border/backgroundID
total length 12
Table 129 Page Border/Background

rang divis value expl


e ion anat
ion
0 based on text
bit 0 by location
One paper standard
0 not included
bit 1 Include header
One include
0 not included
bit 2 Include footer
One include
0 paper
bit3 to 4 area to fill One side
2 border
Table 130 Page Border/Background Properties

data type length expl


(bytes) anat
ion
HWPUNIT 4 text area width
HWPUNIT 4 height of textarea
BYTE One Whether each bit has a reference to the text at that level
BYTE One Whether each bit has a reference to the number of that level
total length 10
Table 131 base sideinformation

4.3.10.2.only definition
data type length expl
(bytes) anat
ion
UINT16 2 Bits 0-15 of the attribute (see Table 132)
HWPUNIT16 2 spacing between columns
WORD array[cnt] 2×cnt If the column widths are not the same, the column width equals the
number of columns.
UINT16 2 Bits 16-32 of the attribute (see Table 133)
UINT8 One Column separator line type (see Border line type in Border/Background)
UINT8 One Column divider thickness (see Border line thickness for
Border/Background)
CORORREF 4 Column divider color (see Border line color in Border/Background)
total length variable 12 + (2×cnt) bytes
Table 132 Column Definition

6
Article Document File

4.3.10.3.header/footer

rang divis value expl


e ion anat
ion
0 plain multistage
bit 0 to 1 sweet kind One distribution
2 parallel multistage
bit 2 to 9 Number of 1-255
Stages (cnt)
0 from the left
bit 10 to 11 one-way One from the right
designation 2 opposite
Whether
bit 12 column
width is the
same
Table 133 Column Definition Attributes

Contains a list of paragraphs.

data type length expl


(bytes) anat
ion
UINT32 4 Properties (see Table 135)
HWPUNIT 4 text area width
HWPUNIT 4 height of textarea
BYTE One Whether each bit has a reference to the text at that level
BYTE One Whether each bit has a reference to the number of that level
total length 14
Table 134 Header/Footer

rang divis value expl


e ion anat
ion
0 both side
bit 0 to 1 The range to which the header will One even side only
be applied (page type) 2 odd side only
Table 135 Header/Footer Properties

4.3.10.4.footnote/endnote
Footnotes/Endnotes have no attributes other than paragraph lists.
butSerialize 8 bytes to reduce garbage values or unnecessary updates.

6
Article Document File

4.3.10.5. auto number

data type length expl


(bytes) anat
ion
UINT32 4 Properties (see Table 137)
UINT16 2 number
WCHAR 2 user symbol
WCHAR 2 front letter
WCHAR 2 back decoration letter
total length 12
Table 136 Automatic number

rang divis value expl


e ion anat
ion
0 page number
One footnote number
bit 0 to 3 number type 2 endnote number
3 picture number
4 table number
5 formula number
bit 4 to 11 number shape See Table 128
only in footnotesused
bit 12 superscript The shape of the number code in the footnote
content in superscript formatwhether to do.

graph 137 automatic numberproperty

4.3.10.6. new numbering


data type length expl
(bytes) anat
ion
property
UINT32 4 range expl
anat
ion
bit 0 to Number type (see table 137)
3
UINT16 2 number
total length 8
Table 138 New Numbering

4.3.10.7. hide
data type length expl
(bytes) anat
ion
property
division value expl
anat
UINT 2 ion
0x00000001 preface
0x00000002 footer
hidden 0x00000004 base side
target 0x00000008 border
0x00000010 background
0x00000020 page number location

6
Article Document File

total length 2
Table 139 Hide

6
Article Document File

4.3.10.8. odd/evenadjustment
data type length expl
(bytes) anat
ion
property
range divis value expl
UINT32 4 ion anat
ion
0 both side
bit 0 to 1 odd/ One even side
even
divisi 2 odd side
on
total length 4
Table 140 Odd/Even Adjustment

4.3.10.9. page number location


data type length expl
(bytes) anat
ion
UINT32 4 Properties (Table 142reference)
WCHAR 2 user symbol
WCHAR 2 front letter
WCHAR 2 back decoration letter
WCHAR 2 always"-"
total length 12
Table 141 Page Number Location

rang divis value expl


e ion anat
ion
bit 0 to 7 number shape See Table 137
0 no page number
One top left
2 middle top
3 top right
bit 8 to 11 display position of the 4 bottom left
number 5 down the middle
6 right below
7 outside top
8 down the outside
9 inside up
10 inside down
Table 142 Page Number Location Attribute

4.3.10.10. Browsemark
data type length expl
(bytes) anat
ion
WORD 2 keyword length (len1)
WCHARarray[len1] 2×len1 First keyword to use for lookup
WORD 2 keyword length (len2)
WCHARarray[len2] 2×len2 Second keyword to use for lookup
UINT16 2 dummy
total length variable 6 + (2×len1) + (2×len2) bytes
Table 143 Lookup Marker

7
Article Document File

4.3.10.11. bookmark
The bookmark control has only 'bookmark name' as the information it has as a bookmark, and is recorded as
HWPTAG_CTRL_DATA, which is arbitrary data of the control. (See Tag: HWPTAG_CTRL_DATA)

4.3.10.12. letter overlap


data type length expl
(bytes) anat
ion
UINT32 4 ctrl ID
WORD 2 overlapcharacter length (len)
WCHAR array[len] 2×len letters to overlap
UINT8 One border type
INT8 One interiorfont size
UINT8 One Spread the text inside the border
UINT8 One Number of character attribute ids inside the border (cnt)
UINT array[cnt] 4 x cnt Array of charshapeids of the text inside the border
total length variable 10 + (2×len) + (4×cnt)
graph 144 letterclash

4.3.10.13. rubbish
data type length expl
(bytes) anat
ion
WORD 2 main Text length
WCHAR 2 main Text
WORD 2 subText length
WCHAR 2 subText
division val expl
UINT 4 ue anat
ion
0 stomach
location of On under
postscript e
2 middle
UINT 4 Fsizeratio
UINT 4 Option
UINT 4 Style number
division val expl
ue anat
ion
UINT 4 0 Justify
On Left align
sort by e
2 right aligned
3 center aligned
4 distribution sort
5 Divide Sort (distributes only to
spaces)
total length 18

Table 145 Comments

4.3.10.14. hidden explanation


Contains only paragraph lists. (Depending on the document security level, hidden description data can be
invalidated.)

7
Article Document File

4.3.10.15. field start


data type length expl
(bytes) anat
ion
UINT32 4 ctrl ID
UINT 4 Properties (Table 147reference)
BYTE One Other properties
WORD 2 command length (len)
WCHAR array[len] 2×len command (each field for each kind to be dealt with
inherenceinformation)
UINT32 4 id (unique ID within the document)
total length variable 15 + (2×len)
Table 146 Fields

rang divis value expl


e ion anat
ion
bit 0 Whether it can be edited even in read-only state
0x1 unopened links
bit 11 to 14 Character properties when updating hyperlink 0x2 link opened
fieldsupdate type
0x4 create link
bit 15 field content whether it has been
modifiedWhether
Table 147 Field Properties

7
Article Document File

4.4. Document history management


Data records used in document history management are as follows.

4.4.1. What is document history management?


Post 'document history management information' is supported from  Post 2005 (6.5.0.724) and document
format version (Doc 5.0.1.7).
This is a place to store the history information of documents displayed and created in “File-Document History
Management” of the Post menu. information' function was provided.)
Each item of document history information is called “history” or “history item”, and each item within the 
Compound structure is stored as a stream named VersionLog%d (%d is the version) inside the storage called
“DocHistory”.Saved. In addition, each item is compressed, encrypted, and stored.
Save the historical information data as a new storage called “DocHistory”.

4.4.2. Document History Management Record Information


4.4.2.1. history item informationstart
TagID: HISTORY_RECORD_TYPE_STAG (0x10)
detail Attachment Data Length
and Type
WORD flag
History item information start
UINT option
Table 148 Starting History Item Information

✓ flag : include record flag for each item


· HISTORY_INFO_FLAG_VERSION (0x01) : version exists
· HISTORY_INFO_FLAG_DATE (0x02): date exists
· HISTORY_INFO_FLAG_WRITER (0x04) : Creator exists
· HISTORY_INFO_FLAG_DESCRIPTION (0x08) : description exists
· HISTORY_INFO_FLAG_DIFFDATA (0x10) : Existence of Diff Data
· HISTORY_INFO_FLAG_LASTDOCDATA : presence of recent documents (not recorded,
required)
· HISTORY_INFO_FLAG_LOCK (0x40): Current history item lock status

✓ option: Common options related to version information


· HWPVERSION_AUTOSAVE (0x00000001) : Auto save when saving document
·

4.4.2.2. history item informationend


TagID: HISTORY_RECORD_TYPE_ETAG (0x11)

4.4.2.3. history itemversion

7
Article Document File

detail Attached Data


Type
End of history item NONE
information
Table 149 End of History Item Information

TagID: HISTORY_RECORD_TYPE_VERSION (0x20)


detail Attached Data
Type
history itemversion DWORD
Table 150 History Item Versions

4.4.2.4. historydate
TagID: HISTORY_RECORD_TYPE_DATE (0x21)
detail Attached Data
Type
historydate SYSTEMDATE
Table 151 History Date

4.4.2.5. historyWriter
TagID: HISTORY_RECORD_TYPE_WRITER (0x22)
detail Attached Data
Type
history writer WCHAR
Table 152 history writer

4.4.2.6. historyexplanation
TagID: HISTORY_RECORD_TYPE_DESCRIPTION (0x23)
detail Attached Data
Type
historyexplanation WCHAR
Table 153 History Description

4.4.2.7. comparisoninformation
TagID: HISTORY_RECORD_TYPE_DIFFDATA (0x30)
detail Attached Data
Type
Comparative WCHAR
information: DiffML
graph 154 comparisoninformation

4.4.2.8. most recent document


TagID: HISTORY_RECORD_TYPE_LASTDOCDATA (0x31)
detail Attached Data
Type
most recent document
(HWPML) WCHAR

graph 155 most last recent document

7
Article Document File

When saving a history item, it starts with the HISTORY_RECORD_TYPE_STAG record and ends with the
HISTORY_RECORD_TYPE_ETAG record.

7
Change history
■ revision 1.2:20141009
- Article Document File Structure Organized by parts
- 5.0 Add some details
- Correct some typos in the content
- 3.0;Excluding HWPML

■ revision 1.1:20110124
- Modification of copyright content
- Correct some typos in the content

■ revision 1.0:20100701
- Post document file format disclosure
Hangul Document File Structure 5.0

Publisher (main)Hangeul and computer

main cow (right) 463-400


10F, Hancom Tower, 49
Daewangpangyo-ro 644beon-gil,
Bundang-gu, Seongnam-si,
Gyeonggi-do
Phone: (031) 627-7000
Fax: (031) 627-7709

You might also like