Cookbook

Integrate javadocx with Slim

Warning

To run javadocx with Slim it is mandatory to use the package that supports namespaces. This package is available for Advanced and Premium licenses.

  • 1- Copy the content of the javadocx package in the folder vendor/javadocx.
  • 2- Open the file composer.json. Add the autoload section, in case it doesn't exist yet. Then add the following classmap:
    "vendor/javadocx/Classes/javadocx"
In a Slim clean installation, the section should look like this:

  • 3- Update the autoloader of Composer:

Now, with these three easy steps completed, you can work with javadocx.

As an example, let's create a document in a controller, and then save it in the public folder with the name output.docx: