AnsweredAssumed Answered

Transform to PDF

Question asked by preetigupta on Jul 6, 2009
Latest reply on Jul 29, 2009 by preetigupta
I have a requirement where when a content is created in web project and submitted for deployment, the rendition of the dcument should be created.

Say, I have a web project called "Gov"
User through his sandbox, will browse to the website, and upload a word document.
User will now submit this document to a workflowfor deployment. I have written a small java script in the workflow to create a PDF rendition
<task-node name="adhoc">
      <task name="wf:adhocTask" swimlane="assignee"> </task>
      <transition name="" to="completed">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
               logger.log("trying to create file and make it versionable");
               var doc1 = bpm_package.children[0];               
               var trans1 = doc1.transformDocument("application/pdf"); 

I do get the log printed in alfresco.log and nowhere error is reported, but the pdf file is not created. Or, the pdf is created but is not visible in that web project. Where would alfresco create the PDF in this case?

I have deployed the same workflow in Document management, and when I run the workflow on any content cretaed in any space, pdf is created in the same space.

Any help would be appreciated.

Thanks and Regards
Preeti Gupta