0

I have this code which i dont know if it is the way to procees of no, my code should convert any document ( for now i am testing with docx) to pdf.

Here is my code:

@Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) {
    CopyService copyService =serviceRegistry.getCopyService();
    NodeService nodeService =serviceRegistry.getNodeService();
    RenditionService2 renditionService2 =serviceRegistry.getRenditionService2();
    NodeRef newUponNodeRef = copyService.copy(actionedUponNodeRef, nodeService.getPrimaryParent(actionedUponNodeRef).getParentRef(),nodeService.getPrimaryParent(actionedUponNodeRef).getTypeQName(),nodeService.getPrimaryParent(actionedUponNodeRef).getQName());
    TransformDefinition transformationDefinition = new TransformDefinition(Mimetype.MIMETYPE_PDF, null, null, null, null);
    renditionService2.render(newUponNodeRef, transformationDefinition);
        
}

and here is my log:

docker-cd-ged-mar-acs-1       |  2022-11-21 15:24:40,207  ERROR [content.transform.LocalTransformServiceRegistry] [QuartzScheduler_Worker-1] Transformer "outlookMsgToLibreofficeViaText" references the transformOptions (tikaOptions) which do not exist. Read from resource alfresco/transforms/0100-basePipelines.json
docker-cd-ged-mar-acs-1       |  2022-11-21 15:24:40,207  ERROR [content.transform.LocalTransformServiceRegistry] [QuartzScheduler_Worker-1] Transformer "htmlToImageViaTXT" references the transformOptions (pdfRendererOptions) which do not exist. Read from resource alfresco/transforms/0100-basePipelines.json
docker-cd-ged-mar-acs-1       |  2022-11-21 15:25:50,251  ERROR [content.transform.LocalTransformServiceRegistry] [QuartzScheduler_Worker-1] Transformer "textToImageViaPdf" references the transformOptions (pdfRendererOptions) which do not exist. Read from resource alfresco/transforms/0100-basePipelines.json

I was expecting a direct conversion to pdf via the code.

tquadrat
  • 3,033
  • 1
  • 16
  • 29
  • Seems that you screwed up the configuration of the service that is called by your code. – tquadrat Nov 22 '22 at 13:10
  • the logs clearly mention "Transformer "name" references the **trasformOptions** (option_name) which do not exist. Read from resource ...." so, have you checked that? – Shark Nov 22 '22 at 13:21

0 Answers0