hwpv5

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

Open opens an HWP 5.0 file and returns a ContentNodeScanner

Types

type ContentScanner

type ContentScanner struct {
	// contains filtered or unexported fields
}

ContentScanner implements document.ContentNodeScanner using a state machine approach. It converts flat record stream into hierarchical content nodes.

func (*ContentScanner) Next

Next returns the next content node using state machine pattern

type FileHeader

type FileHeader struct {
	Signature       string
	Version         Version
	Properties      FileProperties
	SecondFlags     uint32
	EncryptVersion  uint32
	KoglLicenseCode byte
	Reserved        [207]byte
}

FileHeader mirrors the 256-byte FileHeader stream.

type FileProperties

type FileProperties struct {
	Raw uint32
}

FileProperties exposes a few frequently used flags from the FileHeader stream.

func (FileProperties) Compressed

func (p FileProperties) Compressed() bool

func (FileProperties) Encrypted

func (p FileProperties) Encrypted() bool

type ParaTextAddTextOverlap

type ParaTextAddTextOverlap struct {
	// contains filtered or unexported fields
}

type ParaTextAutoNumber

type ParaTextAutoNumber struct {
	// contains filtered or unexported fields
}

type ParaTextBookmarkIndex

type ParaTextBookmarkIndex struct {
	// contains filtered or unexported fields
}

type ParaTextBundleSpace

type ParaTextBundleSpace struct {
	// contains filtered or unexported fields
}

type ParaTextElement

type ParaTextElement interface {
	// contains filtered or unexported methods
}

type ParaTextFieldEnd

type ParaTextFieldEnd struct {
	// contains filtered or unexported fields
}

type ParaTextFieldStart

type ParaTextFieldStart struct {
	// contains filtered or unexported fields
}

type ParaTextFixedSpace

type ParaTextFixedSpace struct {
	// contains filtered or unexported fields
}

type ParaTextFootnoteEndnote

type ParaTextFootnoteEndnote struct {
	// contains filtered or unexported fields
}

type ParaTextGsoTable

type ParaTextGsoTable struct {
	// contains filtered or unexported fields
}

type ParaTextHeaderFooter

type ParaTextHeaderFooter struct {
	// contains filtered or unexported fields
}

type ParaTextHiddenComment

type ParaTextHiddenComment struct {
	// contains filtered or unexported fields
}

type ParaTextHyphen

type ParaTextHyphen struct {
	// contains filtered or unexported fields
}

type ParaTextLineBreak

type ParaTextLineBreak struct {
	// contains filtered or unexported fields
}

type ParaTextPageControl

type ParaTextPageControl struct {
	// contains filtered or unexported fields
}

type ParaTextParaBreak

type ParaTextParaBreak struct {
	// contains filtered or unexported fields
}

type ParaTextSectionColDef

type ParaTextSectionColDef struct {
	// contains filtered or unexported fields
}

type ParaTextString

type ParaTextString struct {
	Value string
	// contains filtered or unexported fields
}

type ParaTextTab

type ParaTextTab struct {
	// contains filtered or unexported fields
}

type ParaTextTitleMark

type ParaTextTitleMark struct {
	// contains filtered or unexported fields
}

type Reader

type Reader struct {
	Header FileHeader
	// contains filtered or unexported fields
}

Reader wraps an open HWP document.

func OpenReader

func OpenReader(ra io.ReaderAt) (*Reader, error)

OpenReader opens an HWP 5.0 file and returns a Reader.

func (*Reader) IsDistributionDoc

func (r *Reader) IsDistributionDoc() bool

IsDistributionDoc returns true if this is a distribution document (uses ViewText).

func (*Reader) OpenSection

func (r *Reader) OpenSection(index int) (io.ReadCloser, error)

OpenSection opens a section stream by index. Returns a reader that handles decompression and decryption as needed.

func (*Reader) SectionCount

func (r *Reader) SectionCount() int

SectionCount returns the number of sections in the document.

type Rec

type Rec interface {
	Tag() uint16
	Lvl() uint16
	Len() uint32
}

Rec represents a typed record.

type RecChartData

type RecChartData struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecChartData) Len

func (b RecChartData) Len() uint32

func (RecChartData) Lvl

func (b RecChartData) Lvl() uint16

func (RecChartData) Tag

func (b RecChartData) Tag() uint16

type RecCtrlData

type RecCtrlData struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecCtrlData) Len

func (b RecCtrlData) Len() uint32

func (RecCtrlData) Lvl

func (b RecCtrlData) Lvl() uint16

func (RecCtrlData) Tag

func (b RecCtrlData) Tag() uint16

type RecCtrlHeader

type RecCtrlHeader struct {
	CtrlID uint32
	Data   []byte
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecCtrlHeader) Len

func (b RecCtrlHeader) Len() uint32

func (RecCtrlHeader) Lvl

func (b RecCtrlHeader) Lvl() uint16

func (RecCtrlHeader) Tag

func (b RecCtrlHeader) Tag() uint16

type RecEqEdit

type RecEqEdit struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecEqEdit) Len

func (b RecEqEdit) Len() uint32

func (RecEqEdit) Lvl

func (b RecEqEdit) Lvl() uint16

func (RecEqEdit) Tag

func (b RecEqEdit) Tag() uint16

type RecFootnoteShape

type RecFootnoteShape struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecFootnoteShape) Len

func (b RecFootnoteShape) Len() uint32

func (RecFootnoteShape) Lvl

func (b RecFootnoteShape) Lvl() uint16

func (RecFootnoteShape) Tag

func (b RecFootnoteShape) Tag() uint16

type RecFormObject

type RecFormObject struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecFormObject) Len

func (b RecFormObject) Len() uint32

func (RecFormObject) Lvl

func (b RecFormObject) Lvl() uint16

func (RecFormObject) Tag

func (b RecFormObject) Tag() uint16

type RecListHeader

type RecListHeader struct {
	IsCell    bool
	ParaCount int16
	Property  uint32
	ColIndex  uint16
	RowIndex  uint16
	ColSpan   uint16
	RowSpan   uint16
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecListHeader) Len

func (b RecListHeader) Len() uint32

func (RecListHeader) Lvl

func (b RecListHeader) Lvl() uint16

func (RecListHeader) Tag

func (b RecListHeader) Tag() uint16

type RecMemoList

type RecMemoList struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecMemoList) Len

func (b RecMemoList) Len() uint32

func (RecMemoList) Lvl

func (b RecMemoList) Lvl() uint16

func (RecMemoList) Tag

func (b RecMemoList) Tag() uint16

type RecMemoShape

type RecMemoShape struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecMemoShape) Len

func (b RecMemoShape) Len() uint32

func (RecMemoShape) Lvl

func (b RecMemoShape) Lvl() uint16

func (RecMemoShape) Tag

func (b RecMemoShape) Tag() uint16

type RecPageBorderFill

type RecPageBorderFill struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecPageBorderFill) Len

func (b RecPageBorderFill) Len() uint32

func (RecPageBorderFill) Lvl

func (b RecPageBorderFill) Lvl() uint16

func (RecPageBorderFill) Tag

func (b RecPageBorderFill) Tag() uint16

type RecPageDef

type RecPageDef struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecPageDef) Len

func (b RecPageDef) Len() uint32

func (RecPageDef) Lvl

func (b RecPageDef) Lvl() uint16

func (RecPageDef) Tag

func (b RecPageDef) Tag() uint16

type RecParaCharShape

type RecParaCharShape struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecParaCharShape) Len

func (b RecParaCharShape) Len() uint32

func (RecParaCharShape) Lvl

func (b RecParaCharShape) Lvl() uint16

func (RecParaCharShape) Tag

func (b RecParaCharShape) Tag() uint16

type RecParaHeader

type RecParaHeader struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecParaHeader) Len

func (b RecParaHeader) Len() uint32

func (RecParaHeader) Lvl

func (b RecParaHeader) Lvl() uint16

func (RecParaHeader) Tag

func (b RecParaHeader) Tag() uint16

type RecParaLineSeg

type RecParaLineSeg struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecParaLineSeg) Len

func (b RecParaLineSeg) Len() uint32

func (RecParaLineSeg) Lvl

func (b RecParaLineSeg) Lvl() uint16

func (RecParaLineSeg) Tag

func (b RecParaLineSeg) Tag() uint16

type RecParaRangeTag

type RecParaRangeTag struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecParaRangeTag) Len

func (b RecParaRangeTag) Len() uint32

func (RecParaRangeTag) Lvl

func (b RecParaRangeTag) Lvl() uint16

func (RecParaRangeTag) Tag

func (b RecParaRangeTag) Tag() uint16

type RecParaText

type RecParaText struct {
	Els []ParaTextElement
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecParaText) Len

func (b RecParaText) Len() uint32

func (RecParaText) Lvl

func (b RecParaText) Lvl() uint16

func (RecParaText) Tag

func (b RecParaText) Tag() uint16

type RecScanner

type RecScanner struct {
	// contains filtered or unexported fields
}

RecScanner consumes a stream of records and yields them sequentially.

func NewRecScanner

func NewRecScanner(r io.Reader) *RecScanner

func (*RecScanner) ScanNext

func (s *RecScanner) ScanNext() (Rec, error)

type RecShapeComponent

type RecShapeComponent struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecShapeComponent) Len

func (b RecShapeComponent) Len() uint32

func (RecShapeComponent) Lvl

func (b RecShapeComponent) Lvl() uint16

func (RecShapeComponent) Tag

func (b RecShapeComponent) Tag() uint16

type RecShapeComponentArc

type RecShapeComponentArc struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecShapeComponentArc) Len

func (b RecShapeComponentArc) Len() uint32

func (RecShapeComponentArc) Lvl

func (b RecShapeComponentArc) Lvl() uint16

func (RecShapeComponentArc) Tag

func (b RecShapeComponentArc) Tag() uint16

type RecShapeComponentContainer

type RecShapeComponentContainer struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecShapeComponentContainer) Len

func (b RecShapeComponentContainer) Len() uint32

func (RecShapeComponentContainer) Lvl

func (b RecShapeComponentContainer) Lvl() uint16

func (RecShapeComponentContainer) Tag

func (b RecShapeComponentContainer) Tag() uint16

type RecShapeComponentCurve

type RecShapeComponentCurve struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecShapeComponentCurve) Len

func (b RecShapeComponentCurve) Len() uint32

func (RecShapeComponentCurve) Lvl

func (b RecShapeComponentCurve) Lvl() uint16

func (RecShapeComponentCurve) Tag

func (b RecShapeComponentCurve) Tag() uint16

type RecShapeComponentEllipse

type RecShapeComponentEllipse struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecShapeComponentEllipse) Len

func (b RecShapeComponentEllipse) Len() uint32

func (RecShapeComponentEllipse) Lvl

func (b RecShapeComponentEllipse) Lvl() uint16

func (RecShapeComponentEllipse) Tag

func (b RecShapeComponentEllipse) Tag() uint16

type RecShapeComponentLine

type RecShapeComponentLine struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecShapeComponentLine) Len

func (b RecShapeComponentLine) Len() uint32

func (RecShapeComponentLine) Lvl

func (b RecShapeComponentLine) Lvl() uint16

func (RecShapeComponentLine) Tag

func (b RecShapeComponentLine) Tag() uint16

type RecShapeComponentOLE

type RecShapeComponentOLE struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecShapeComponentOLE) Len

func (b RecShapeComponentOLE) Len() uint32

func (RecShapeComponentOLE) Lvl

func (b RecShapeComponentOLE) Lvl() uint16

func (RecShapeComponentOLE) Tag

func (b RecShapeComponentOLE) Tag() uint16

type RecShapeComponentPicture

type RecShapeComponentPicture struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecShapeComponentPicture) Len

func (b RecShapeComponentPicture) Len() uint32

func (RecShapeComponentPicture) Lvl

func (b RecShapeComponentPicture) Lvl() uint16

func (RecShapeComponentPicture) Tag

func (b RecShapeComponentPicture) Tag() uint16

type RecShapeComponentPolygon

type RecShapeComponentPolygon struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecShapeComponentPolygon) Len

func (b RecShapeComponentPolygon) Len() uint32

func (RecShapeComponentPolygon) Lvl

func (b RecShapeComponentPolygon) Lvl() uint16

func (RecShapeComponentPolygon) Tag

func (b RecShapeComponentPolygon) Tag() uint16

type RecShapeComponentRectangle

type RecShapeComponentRectangle struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecShapeComponentRectangle) Len

func (b RecShapeComponentRectangle) Len() uint32

func (RecShapeComponentRectangle) Lvl

func (b RecShapeComponentRectangle) Lvl() uint16

func (RecShapeComponentRectangle) Tag

func (b RecShapeComponentRectangle) Tag() uint16

type RecShapeComponentTextArt

type RecShapeComponentTextArt struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecShapeComponentTextArt) Len

func (b RecShapeComponentTextArt) Len() uint32

func (RecShapeComponentTextArt) Lvl

func (b RecShapeComponentTextArt) Lvl() uint16

func (RecShapeComponentTextArt) Tag

func (b RecShapeComponentTextArt) Tag() uint16

type RecShapeComponentUnknown

type RecShapeComponentUnknown struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecShapeComponentUnknown) Len

func (b RecShapeComponentUnknown) Len() uint32

func (RecShapeComponentUnknown) Lvl

func (b RecShapeComponentUnknown) Lvl() uint16

func (RecShapeComponentUnknown) Tag

func (b RecShapeComponentUnknown) Tag() uint16

type RecTable

type RecTable struct {
	Data     []byte
	RowCount uint16
	ColCount uint16
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecTable) Len

func (b RecTable) Len() uint32

func (RecTable) Lvl

func (b RecTable) Lvl() uint16

func (RecTable) Tag

func (b RecTable) Tag() uint16

type RecUnknown

type RecUnknown struct {
	Data []byte
	// contains filtered or unexported fields
}

RecUnknown keeps the raw payload when no concrete type is defined.

func (RecUnknown) Len

func (b RecUnknown) Len() uint32

func (RecUnknown) Lvl

func (b RecUnknown) Lvl() uint16

func (RecUnknown) Tag

func (b RecUnknown) Tag() uint16

type RecVideoData

type RecVideoData struct {
	// contains filtered or unexported fields
}

Body record concrete types (payloads are intentionally empty scaffolds).

func (RecVideoData) Len

func (b RecVideoData) Len() uint32

func (RecVideoData) Lvl

func (b RecVideoData) Lvl() uint16

func (RecVideoData) Tag

func (b RecVideoData) Tag() uint16

type Version

type Version struct {
	Major byte
	Minor byte
	Patch byte
	Rev   byte
}

Version stores the four-part HWP version number (MM.nn.PP.rr).

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL