The library includes a command-line tool for inspecting HWP files:
bash
# Install the tool
cargo install hwpers
# Inspect an HWP file
hwp_info document.hwp
Format Support
This library supports HWP 5.0 format files. For older HWP formats, consider using format conversion tools first.
Writer Features (v0.3.0+)
The HWP writer functionality has been significantly improved with comprehensive feature support:
✅ Fully Implemented
Hyperlinks: Complete hyperlink support with proper serialization
URL links, email links, file links, bookmarks
Multiple hyperlinks per paragraph
Custom styling (colors, underline, visited state)
Header/Footer: Full header and footer implementation
Custom header/footer text
Page numbering with multiple formats (numeric, roman, etc.)
Multiple headers/footers per document
Page Layout: Comprehensive page layout control
Custom page sizes and standard sizes (A4, Letter, etc.)
Portrait/landscape orientation
Custom margins (narrow, normal, wide, custom)
Multi-column layouts with adjustable spacing
Page background colors
Tables: Full table creation and formatting
Cell borders and styling
Cell merging (horizontal and vertical)
Custom cell content
Lists/Numbering: Complete list support
Bullet lists with different symbols per level
Numbered lists (1., 2., 3., ...)
Alphabetic lists (a), b), c), ...)
Roman numeral lists (i., ii., iii., ...)
Korean lists (가., 나., 다., ...)
Nested lists with proper indentation
Text Boxes: Full text box implementation
Positioned text boxes
Styled text boxes (highlight, warning, info, etc.)
Custom styling (borders, backgrounds, alignment)
Floating text boxes with rotation and transparency
Images: Complete image insertion
PNG, JPEG, BMP, GIF support
Custom dimensions and positioning
Image captions
Proper BinData integration
Styled Text: Rich text formatting
Bold, italic, underline, strikethrough
Custom fonts and sizes
Text colors and background colors
Multiple styles in single paragraph
Advanced Formatting:
Paragraph alignment (left, center, right, justify)
Line spacing control
Paragraph spacing (before/after)
Headings with automatic sizing
Character and paragraph styles
Document Properties: Full metadata support
Title, author, subject, keywords
Document statistics (character count, word count, etc.)
Automatic statistics updates
❌ Not Yet Implemented
Shapes/Drawing: Geometric shapes and drawing objects
Rectangles, circles, ellipses
Lines, arrows, polygons
Custom shapes with styling
Shapes with text content
Shape grouping
(See examples/shape_document.rs.disabled for usage examples)
Charts/Graphs: Data visualization objects
Mathematical Equations: MathML support
Forms: Input fields and form controls
Comments/Annotations: Review and comment features
Track Changes: Revision history
Mail Merge: Variable field insertion
Known Issues
No compression support for writer (reader supports both compressed and uncompressed)
Some advanced table features may have compatibility issues with older Hanword versions
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.