Configure HTML pipelines via txt to secure HTML transforms - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License

The following pipelines will have to be configured:

  • htmlToPdfViaTXT – pipeline that will deal with HTML to PDF transformation through plain text. It still uses LibreOffice but for TEXT to PDF transformation, not for HTML to PDF.
  • htmlToImageViaTXT - pipeline to transform HTML to image that will use the out-of-the-box textToImageViaPdf pipeline
{
  "transformers": [
    {
      "transformerName": "htmlToPdfViaTXT",
      "transformerPipeline": [
        {
          "transformerName": "string",
          "targetMediaType": "text/plain"
        },
        {
          "transformerName": "libreoffice"
        }
      ],
      "supportedSourceAndTargetList": [
        {
          "sourceMediaType": "text/html",
          "priority": 10,
          "targetMediaType": "application/pdf"
        }
      ],
      "transformOptions": [
      ]
    },
    {
      "transformerName": "htmlToImageViaTXT",
      "transformerPipeline": [
        {
          "transformerName": "string",
          "targetMediaType": "text/plain"
        },
        {
          "transformerName": "textToImageViaPdf"
        }
      ],
      "supportedSourceAndTargetList": [
        {
          "sourceMediaType": "text/html",
          "priority": 10,
          "targetMediaType": "image/png"
        }
      ],
      "transformOptions": [
        "pdfRendererOptions",
        "imageMagickOptions"
      ]
    }
  ]
}

Store this transform configuration in a file called 0200-html-via-txt.json.