ahmedshareefogp/docx-manager

A PHP library to generate, modify, and manage DOCX files (Laravel-friendly).

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/ahmedshareefogp/docx-manager

v1.0.0 2025-10-20 07:19 UTC

This package is auto-updated.

Last update: 2025-10-21 05:32:00 UTC


README

๐Ÿงฉ DocxManager

DocxManager is a powerful PHP library for reading, editing, and rebuilding .docx documents โ€” without needing Microsoft Word. It lets you replace placeholders, repeat table rows or sections, tweak text formatting, and handle checkboxes โ€” all while preserving the original document structure and styling.

Version 1.0 ๐Ÿš€ Features

  • Smart Placeholder Replacement โ€“ Replace tags like v_first_name_v across paragraphs, tables, and lists without breaking formatting.
  • Repeating Sections โ€“ Duplicate or remove content blocks between markers (e.g., rr__rstart__rr / rr__rend__rr) using array data.
  • Run & Font Controls โ€“ Modify font size, color, and styles on individual text runs while preserving document structure.
  • Paragraph & Spacing Tools โ€“ Adjust line height, before/after spacing, and fix RTL indentation in tables or lists.
  • Checkbox & Form Handling โ€“ Automatically update checkboxes and form fields based on provided data.
  • Lightweight & Framework-Agnostic โ€“ 100% PHP; works with Laravel, Symfony, or standalone projects.
  • Safe DOCX Repackaging โ€“ Maintains media, styles, and relationships during file rebuilds.
  • Extensible Design โ€“ Modular methods for easy customization and future feature expansion.

๐Ÿงช Coming Soon (v1.1+)

  • Streaming placeholder replacement
  • Hybrid Processing Mode โ€“ Combines DOM and streaming XML for high performance and low memory use, even on large DOCX files.
  • Built-in benchmarking (track option)