cancel
Showing results for 
Search instead for 
Did you mean: 

Content Transformations

ralph78
Champ in-the-making
Champ in-the-making
Hallo ,

ich habe ein Problem mit Content Transformations. Ich möchte ein PDF in Flash
umwandeln. Ich hab nach dieser Anleitung http://wiki.alfresco.com/wiki/Content_Transformations
die Datei my-transformers-context.xml unter /opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension angelegt :

<bean id="transformer.Pdf2Swf" class="org.alfresco.repo.content.transform.RuntimeExecutableContentTransformer" parent="baseContentTransformer">
      <property name="checkCommand">
         <bean class="org.alfresco.util.exec.RuntimeExec">
            <property name="commandMap">
                <map>
                    <entry key=".*">
                        <value>pdf2swf -help</value>
                    </entry>
                </map>
            </property>
            <property name="errorCodes">
               <value>2</value>
            </property>
         </bean>
      </property>
      <property name="transformCommand">
         <bean class="org.alfresco.util.exec.RuntimeExec">
            <property name="commandMap">
                <map>
                    <entry key="Linux">
                        <value>pdf2swf '${source}'  -o '${target}'</value>
                    </entry>
                    <entry key="Windows.*">
                        <value>pdf2swf '${source}'  -o '${target}'</value>
                    </entry>
                </map>
            </property>
            <property name="errorCodes">
               <value>2</value>
            </property>
         </bean>
      </property>
      <property name="explicitTransformations">
         <list>
            <bean class="org.alfresco.repo.content.transform.ContentTransformerRegistry$TransformationKey" >
                <constructor-arg><value>application/pdf</value></constructor-arg>
                <constructor-arg><value>application/x-shockwave-flash</value></constructor-arg>
            </bean>
         </list>
      </property>
   </bean>
Wenn ich Alfresco nun starte bekomme ich folgende Fehler :

ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from file [/opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/my-transformers-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'bean'.
Caused by:
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'bean'.

Der Rest sind sicherlich Folgefehler. Kann mir einer dabei helfen mittels pdf2swf PDFs in Flash
umzuwandeln ?

Vielen Dank

Ralph
3 REPLIES 3

jpfi_4454
Champ in-the-making
Champ in-the-making
Hallo Ralph,
dein <bean>-Element muss von einem <beans>-Element umschlossen sein. Deswegen meckert der SAX-Parser.
Viele Grüße,
Jan

ralph78
Champ in-the-making
Champ in-the-making
Hallo,

das scheint zu funktionieren.
Zumindest kommt kein Fehler mehr beim Start.

Aber wo finde ich in Alfresco nun diesen Content Transformator ?
Ich wollte damit eine Regel für ein Space erstellen.

Ralph

jpfi_4454
Champ in-the-making
Champ in-the-making
Hallo,
das Transformator-Framework hält sich relativ im Backend und wählt selbstständig den zu verwendenen Transformaor anhand der quell und ziel-mimetypen aus.
Sprich du kannst das ganze einfach per Run Action oder eine entsprechende regel testen.
Viele grüße, Jan
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.