AnsweredAssumed Answered

How transformation to PDF is done?

Question asked by imphilippesimo on Oct 11, 2016
Latest reply on Oct 12, 2016 by imphilippesimo

Hello,

i'm trying to find a suitable way to convert a file (a docx in my case) to a PDF one.

 

i took as reference this link https://community.alfresco.com/docs/DOC-5359-noderef-cookbook#w_transformingappttopdf

where we have this snippet:

ContentReader pptReader = contentService.getReader(pptNodeRef, ContentModel.PROP_CONTENT);
       ContentWriter pdfWriter = contentService.getWriter(pdfNodeRef, ContentModel.PROP_CONTENT, true);
       ContentTransformer pptToPdfTransformer =
           contentService.getTransformer(MimetypeMap.MIMETYPE_PPT, MimetypeMap.MIMETYPE_PDF);
       pptToPdfTransformer.transform(pptReader, pdfWriter);

I know  that pdfNodeRef has to be a nodeRef with a non null mimetype, implying a non null metadata.

So this means pdfNodeRef should already be existing with a consequent content.

I then wonder if this snippet is about crushing pdfNodeRef or just converting   pptNodeRef?

 

Help me understand please?

Outcomes