AnsweredAssumed Answered

Convert files to PDF

Question asked by croc on Mar 1, 2011
Latest reply on Mar 2, 2011 by croc
Hi,

I need to convert files to PDF in share.

I have the code below, but it does not work.
 onActionTransformDocument: function dlA_onActionTransformDocument(asset)
      {
         var displayName = asset.displayName, fileName = asset.fileName,
            nodeRef = new Alfresco.util.NodeRef(asset.nodeRef);
    var resultString = "failed", resultCode = false;
            resultString = "convert.failed";
         var nodeTrans = nodeRef.transformDocument("application/pdf");
         if (nodeTrans != null)
           {
              resultString = "converted";
              resultCode = true;
           }
      },

Can someone help me.

Thanks,
Croc

Outcomes