Restore HTML pipelines that use LibreOffice - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License

To re-enable the HTML pipelines that use LibreOffice, you can restore them at your own risk and get the original behavior again.

If you disabled the HTML transforms that use LibreOffice using the instructions in Securing HTML transformations, then enable the original behavior by reverting those changes.

If you’re using a version of Content Services that already comes with these transformations disabled, then create a configuration file containing the original pipelines as below:

{
  "transformers": [
    {
      "transformerName": "htmlToPdfViaOdt",
      "transformerPipeline": [
        {
          "transformerName": "libreoffice",
          "targetMediaType": "application/vnd.oasis.opendocument.text"
        },
        {
          "transformerName": "libreoffice"
        }
      ],
      "supportedSourceAndTargetList": [
        {
          "sourceMediaType": "text/html",
          "priority": 10,
          "targetMediaType": "application/pdf"
        }
      ],
      "transformOptions": [
      ]
    },
    {
      "transformerName": "htmlToImageViaPdf",
      "transformerPipeline": [
        {
          "transformerName": "htmlToPdfViaOdt",
          "targetMediaType": "application/pdf"
        },
        {
          "transformerName": "pdfToImageViaPng"
        }
      ],
      "supportedSourceAndTargetList": [
      ],
      "transformOptions": [
        "pdfRendererOptions",
        "imageMagickOptions"
      ]
    },
    {
      "transformerName": "libreofficeHtmlToPdfViaOdt",
      "transformerPipeline": [
        {
          "transformerName": "libreoffice",
          "targetMediaType": "application/vnd.oasis.opendocument.text"
        },
        {
          "transformerName": "libreoffice"
        }
      ],
      "supportedSourceAndTargetList": [
        {
          "sourceMediaType": "text/html",
          "priority": 10,
          "targetMediaType": "application/pdf"
        }
      ],
      "transformOptions": [
      ]
    }
  ]
}

Store this transform configuration in a file called restore-html-libreoffice.json.