PHPackages                             tsv2013/open-office-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tsv2013/open-office-generator

Abandoned → [tsv2013/open-document-generator](/?search=tsv2013%2Fopen-document-generator)Library[Utility &amp; Helpers](/categories/utility)

tsv2013/open-office-generator
=============================

10PHPCI passing

Since Mar 30Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/tsv2013/open-document-generator)[ Packagist](https://packagist.org/packages/tsv2013/open-office-generator)[ RSS](/packages/tsv2013-open-office-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![PHP Composer](https://github.com/tsv2013/open-office-generator/actions/workflows/php.yml/badge.svg)](https://github.com/tsv2013/open-office-generator/actions/workflows/php.yml)

Open Document Generator library
-------------------------------

[](#open-document-generator-library)

Allows to create and store an ODT file. Supports:

- headers
- paragraphs
- tables
- tables of content
- styles: text, paragraph, table cell, table column

Requirements:

- zip library enabled in php.ini file

```
extension=zip

```

Sample usage
------------

[](#sample-usage)

ODT file minimal creation code:

```
$fileName = dirname(__FILE__) . "/document1.odt";
$docFile = new ODFile($fileName);
$document = $docFile->document;
$document->add_heading("Test heading");
$document->add_para("Lorem ipsum");

$docFile->create();
```

ODS file minimal creation code:

```
$fileName = dirname(__FILE__) . "/document1.ods";
$docFile = new ODFile($fileName);
$document = $docFile->document;

$table = new ODTable([10, 7]);
$document->add($table);

$row = $table->create_row();
$row->add_cell_with_text("Column 1");
$row->add_cell_with_text("Column 2");
$row = $table->create_row();
$row->add_cell_with_text("val 1");
$row->add_cell_with_text("val 2");

$docFile->create();
```

Development Roadmap
-------------------

[](#development-roadmap)

### Current Implementation Status

[](#current-implementation-status)

✅ **Implemented Features:**

- Basic ODT and ODS document creation
- Headers and paragraphs
- Tables with basic formatting
- Table of contents
- Images and graphics
- Basic text and paragraph styles
- Table cell and column styles
- Document manifest and file structure

### Priority 1: Essential Text Document Features (ODT)

[](#priority-1-essential-text-document-features-odt)

#### 1.1 Advanced Text Formatting

[](#11-advanced-text-formatting)

- **Rich text formatting within paragraphs**
    - Bold, italic, underline text spans
    - Font size, color, and family changes
    - Superscript and subscript
    - Strikethrough and highlighting
- **Lists support**
    - Numbered lists (ordered)
    - Bulleted lists (unordered)
    - Nested list levels
    - Custom list styles
- **Text alignment and spacing**
    - Justified text alignment
    - Line spacing control
    - Paragraph spacing (before/after)
    - Indentation controls

#### 1.2 Document Structure

[](#12-document-structure)

- **Page breaks and section breaks**
    - Manual page breaks
    - Section breaks with different formatting
    - Column layouts
- **Headers and footers**
    - Page headers and footers
    - Different headers for first/odd/even pages
    - Dynamic content (page numbers, dates)
- **Hyperlinks and bookmarks**
    - Internal document links
    - External web links
    - Named anchors/bookmarks
- **Fields and references**
    - Page number fields
    - Date/time fields
    - Cross-references
    - Table of figures/tables

#### 1.3 Advanced Table Features

[](#13-advanced-table-features)

- **Table formatting**
    - Borders and grid lines
    - Cell background colors
    - Cell merging (rowspan/colspan)
    - Table positioning and wrapping
- **Table styles**
    - Predefined table styles
    - Alternating row colors
    - Header row formatting

### Priority 2: Essential Spreadsheet Features (ODS)

[](#priority-2-essential-spreadsheet-features-ods)

#### 2.1 Cell Content and Formulas

[](#21-cell-content-and-formulas)

- **Formula support**
    - Basic arithmetic operations (+, -, \*, /)
    - Common functions (SUM, AVERAGE, COUNT, etc.)
    - Cell references (A1, $A$1, etc.)
    - Range references (A1:B10)
- **Data types**
    - Number formatting (currency, percentage, decimal places)
    - Date and time formatting
    - Text formatting
    - Boolean values
- **Cell content**
    - Rich text within cells
    - Multi-line text
    - Text wrapping

#### 2.2 Spreadsheet Structure

[](#22-spreadsheet-structure)

- **Multiple worksheets**
    - Sheet creation and naming
    - Sheet navigation
    - Sheet protection
- **Row and column operations**
    - Auto-sizing columns/rows
    - Row/column insertion/deletion
    - Row/column hiding/showing
- **Cell operations**
    - Cell merging
    - Cell protection
    - Data validation rules

#### 2.3 Charts and Visualization

[](#23-charts-and-visualization)

- **Basic chart types**
    - Column/bar charts
    - Line charts
    - Pie charts
    - Scatter plots
- **Chart formatting**
    - Titles and labels
    - Legend positioning
    - Color schemes
    - Data series formatting

### Priority 3: Document Metadata and Properties

[](#priority-3-document-metadata-and-properties)

#### 3.1 Document Information

[](#31-document-information)

- **Standard metadata**
    - Title, subject, keywords
    - Author and creator information
    - Creation and modification dates
    - Document description
- **Custom properties**
    - User-defined metadata fields
    - Property categories

### Priority 4: Advanced Features

[](#priority-4-advanced-features)

#### 4.1 Document Collaboration

[](#41-document-collaboration)

- **Change tracking**
    - Track changes mode
    - Comments and annotations
    - Review and approval workflow
- **Document protection**
    - Password protection
    - Read-only mode
    - Editing restrictions

#### 4.2 Advanced Formatting

[](#42-advanced-formatting)

- **Styles and themes**
    - Style inheritance
    - Custom style creation
    - Style templates
    - Document themes
- **Advanced graphics**
    - Shapes and drawing objects
    - Text boxes
    - Grouping and layering
    - Rotation and scaling

#### 4.3 Data Integration

[](#43-data-integration)

- **External data**
    - Database connections
    - CSV import/export
    - XML data binding
- **Pivot tables (ODS)**
    - Data summarization
    - Dynamic filtering
    - Calculated fields

### Priority 5: Performance and Quality

[](#priority-5-performance-and-quality)

#### 5.1 Performance Optimization

[](#51-performance-optimization)

- **Memory management**
    - Large document handling
    - Streaming for big files
    - Memory usage optimization
- **File size optimization**
    - Compression improvements
    - Duplicate resource handling

#### 5.2 Error Handling and Validation

[](#52-error-handling-and-validation)

- **Input validation**
    - Data type validation
    - Range checking
    - Format validation
- **Error reporting**
    - Detailed error messages
    - Validation warnings
    - Debug information

### Implementation Notes

[](#implementation-notes)

- **Phase 1** (Priority 1-2): Focus on core functionality that most users need
- **Phase 2** (Priority 3): Add professional document features
- **Phase 3** (Priority 4-5): Advanced features and optimization

Each feature should include:

- Unit tests
- Documentation updates
- Example usage code
- Backward compatibility considerations

See also
--------

[](#see-also)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance64

Regular maintenance activity

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0243c8748bf705edc87844afede17ed8e831004fb04afd158604ea66a8f338dd?d=identicon)[tsv2013](/maintainers/tsv2013)

---

Top Contributors

[![tsv2013](https://avatars.githubusercontent.com/u/3013415?v=4)](https://github.com/tsv2013 "tsv2013 (16 commits)")

---

Tags

generatorods-filesodt-filesopenofficephpphp-library

### Embed Badge

![Health badge](/badges/tsv2013-open-office-generator/health.svg)

```
[![Health](https://phpackages.com/badges/tsv2013-open-office-generator/health.svg)](https://phpackages.com/packages/tsv2013-open-office-generator)
```

###  Alternatives

[tga/simhash-php

SimHash similarities algorithm implementation for PHP 5.3

15243.5k1](/packages/tga-simhash-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
