Docx Import Library

This library provides a convenient way to import a DOCX file and convert it to HTML. The main functionality is encapsulated in the index method of the provided class.

Installation

Build the container by running DOCKER_BUILDKIT=1 docker build -t docx-importer --target docximporter --ssh default=$SSH_AUTH_SOCK . You may need to adjust the hardcoded version in the Dockerfile. In that case you also need to adjust the version in DocxImportController::import in src/Controller/DocxImportController.php. To build the nginx container run DOCKER_BUILDKIT=1 docker build -t docx-importer-nginx --target nginx .

Usage

To import a DOCX file and convert it to HTML, follow these steps:

  1. Make a POST request to the /docx/import route.
  2. Include the DOCX file in the request payload using the docxFile parameter.
  3. The method will handle the request and perform the conversion and returns a json Response.