cancel
Showing results for 
Search instead for 
Did you mean: 

How to create doclib with custom T-Engine

fedorow
Elite Collaborator
Elite Collaborator

Hello!

I've  created a custom transformer for a new xmind mimetype. It does three transformation: xmind to txt for the solr6 search engine, xmind to pdf for document preview in Share and png for thumbnails in Share. It works fine in tests and alfresco successfully use it for text and pdf transformation. But the repo do not initializes thumbnail generation:

Here is the transformer config:

 

 

{
  "transformOptions": {
    "xmindOptions": [
      { "value": { "name": "thumbnail" } },
      { "value": { "name": "resizeHeight" } },
      { "value": { "name": "resizeWidth" } },
      { "value": { "name": "resizePercentage" } },
      { "value": { "name": "allowEnlargement" } },
      { "value": { "name": "maintainAspectRatio" } }
    ]
  },
  "transformers": [
    {
      "transformerName": "xmind",
      "supportedSourceAndTargetList": [
        {
          "sourceMediaType": "application/x-xmind",
          "targetMediaType": "text/plain"
        },
        {
          "sourceMediaType": "application/x-xmind",
          "targetMediaType": "application/pdf"
        },
        {
          "sourceMediaType": "application/x-xmind",
          "targetMediaType": "image/png"
        }
      ],
      "transformOptions": ["xmindOptions"]
    }
  ]
}

 

 

The javascript does not create doclib. There is no errors, just do nothing:

 

 

document.createThumbnail("doclib");

 

 

How to configure Alfresco or transformer to create the doclib thumbnail?

Thanks, Serge

Alfresco community 23.3, Docker Compose deployment

1 ACCEPTED ANSWER

angelborroy
Community Manager Community Manager
Community Manager

I guess that you need to extend the "pdfrenderer" transformer, to add the x-xmind to png pipeline:

https://github.com/Alfresco/alfresco-transform-core/blob/master/engines/pdfrenderer/src/main/resourc...

Hyland Developer Evangelist

View answer in original post

2 REPLIES 2

angelborroy
Community Manager Community Manager
Community Manager

I guess that you need to extend the "pdfrenderer" transformer, to add the x-xmind to png pipeline:

https://github.com/Alfresco/alfresco-transform-core/blob/master/engines/pdfrenderer/src/main/resourc...

Hyland Developer Evangelist

fedorow
Elite Collaborator
Elite Collaborator

Thanks Angel!

I removed png from my transformer and made two new pipelines for png and jpeg thumbnails.