AnsweredAssumed Answered

How to execute a transformation to PDF with versioning

Question asked by ragnaroek-hh on Mar 8, 2010
I need for versioning PDFs created by transformation.
This does not work via the jscript API funktion  node.transformDocument("application/pdf"). It  does not over-write existing PDFs. Even with versioning enabled, the function dies NOT over-write.

Running an action "transform and copy content to a sepcific space" from explorer does support versions on the PDFs created. Thats why i try to call this action:

var transform = actions.create("transform");
transform.parameters["mime-type"]    = "application/pdf";
transform.parameters["destination-folder"]   = userhome;
transform.parameters["assoc-type"]    = "cm:content";
transform.parameters["assoc-name"]    = "cm:contains";
transform.parameters["overwrite-copy"]   = false;


This unfortunately causes alfresco 3.2r2 to fly into:
    Caused by: java.lang.NullPointerException
       at org.alfresco.repo.copy.CopyServiceImpl.recursiveCopy(
       at org.alfresco.repo.copy.CopyServiceImpl.copyImpl(
       at org.alfresco.repo.copy.CopyServiceImpl.copy(
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
       at java.lang.reflect.Method.invoke(
       at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
Any idea for other parameters (or may be for a smarter solution)? Help appreciated!