HWP Structure in English
HWP Structure in English
com
Writing
document file
structure
(Hwp Document File Formats)
order
Copyright················································································One
1. outline··························································································5
2. data typeexplanation·······································································6
3.2.6.··································································································Previewtext
12
3.2.7.·······························································································Previewimage
12
3.2.10.···························································································XML template
13
4. datarecord···················································································16
4.2.3.···································································································binarydata
18
4.2.4.···········································································································font
20
4.2.5.······················································································border/background
21
4.3.9.2.1.object element····················································································40
4.3.9.2.2.·························································································line object
42
Article Document File
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.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
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.
7
Article Document File
8
Article Document File
9
Article Document File
1
Article Document File
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
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
■ 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
If you say 'control' or 'control character' without additional explanation in this document, you are referring to this extended control.
1
Article Document File
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.
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
1
Article Document File
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
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.
1
Article Document File
1
Article Document File
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
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
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
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
value expl
anat
ion
0 Slash
One BackSlash
2 CrookedSlash
graph 27 diagonaltype
2
Article Document File
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
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
2
Article Document File
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
2
Article Document File
2
Article Document File
total length 8
Table 39 Paragraph Head Information
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.10. Paragraphshape
Tag ID: HWPTAG_PARA_SHAPE
data type length expl
(bytes) anat
ion
3
Article Document File
3
Article Document File
3
Article Document File
HWPTAG_DOC_DATA
3
Article Document File
3
Article Document File
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
3
Article Document File
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.
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.6. controlheader
controlIf the character exists, the existing control information is created from the control character.
3
Article Document File
4
Article Document File
4
Article Document File
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
4
Article Document File
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
4
Article Document File
4
Article Document File
4
Article Document File
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
4
Article Document File
total length 11
Table 86 Border Line Information
4
Article Document File
value expl
anat
ion
0 normal
One outer
2 inner
Table 88 Outline style
4
Article Document File
total length 12
Table 90 Text Properties for Drawing Object Text Boxes
5
Article Document File
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
5
Article Document File
5
Article Document File
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
5
Article Document File
* The text formula script is compatible with EQN script, and detailed specifications are added later
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
5
Article Document File
ion
5
Article Document File
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
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
6
Article Document File
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
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
6
Article Document File
6
Article Document File
6
Article Document File
6
Article Document File
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
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.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.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.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
7
Article Document File
7
Article Document File
7
Article Document File
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
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