AnsweredAssumed Answered

AutoCad Drawing file transformation to BMP failed- did I miss anything

Question asked by imrulhasan on Jan 16, 2016
Latest reply on Jan 16, 2016 by imrulhasan
Dear Experts,

I am trying to transform Autocad drawing file to bmp file without success. I have followed guidelines from

1. https://wiki.alfresco.com/wiki/DWG_Transformations
2. https://forums.alfresco.com/forum/developer-discussions/repository-services/solved-dwg-transformation-07292014-0940
3. http://www.ribbonsoft.com/de/qcad-documentation/qcad-command-line-tools
4. Alfresco Early Access 5.1.x

I have created following files. Did I miss anything?

dwg2bmp-transform-context.xml [tomcat/shared/classes/alfresco/extension]

[Attached after changing file extension to TXT]
===================================

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

        <!– DWG 2 BMP worker –>
        <bean id="transformer.worker.dwg2bmp" class="org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker">
                <property name="mimetypeService">
                        <ref bean="mimetypeService" />
                </property>
                <property name="checkCommand">
                        <bean  class="org.alfresco.util.exec.RuntimeExec">
                                <property name="commandsAndArguments">
                                        <map>
                                                <entry key=".*">
                                                                <value>${dwg.root}/dwg2bmp -h</value>
                                                </entry>
                                        </map>
                                </property>
                        </bean>
                </property>

                <property name="transformCommand">
                        <bean  class="org.alfresco.util.exec.RuntimeExec">
                                <property name="commandsAndArguments">
                                        <map>
                                                <entry key=".*">
                                                                <value>${dwg.root}/dwg2bmp -o ${target} ${source}</value>
                                                </entry>
                                        </map>
                                </property>
                                <property name="waitForCompletion">
                                        <value>true</value>
                                </property>
                        </bean>
                </property>

                <property name="explicitTransformations">
                        <list>
                                <bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
                                        <property name="sourceMimetype"><value>image/vnd.dwg</value></property>
                                        <property name="targetMimetype"><value>image/bmp</value></property>
                                </bean>
                        </list>
                </property>
        </bean>

        <!– DWG to SVG worker –>

        <!– SVG to (vectorized) PDF worker –>

        <!– SVG to PNG worker –>

        <!– DWG to BMP –>
        <bean id="transformer.dwg2bmp" class="org.alfresco.repo.content.transform.ProxyContentTransformer" parent="baseContentTransformer">
                <property name="worker">
                        <ref bean="transformer.worker.dwg2bmp" />
                </property>
        </bean>

        <!– SVG to (vectorized) PDF –>

        <!– SVG to PNG –>

        <!– DWG to PNG –>

        <!– DWG to SWF –>

        <!– SVG to thumbnail –>

        <!– Support DWG to thumbnail transforms using cad2svg –>

        <!– Support DWG to SWF transforms using cad2svg –>

</beans>



alfresco-global.properties
============================


### External executable locations ###
ooo.exe=/Applications/GreenDoc/libreoffice.app/Contents/MacOS/soffice
ooo.enabled=true
ooo.port=8100
img.root=/Applications/GreenDoc/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
dwg.root=/Applications/QCAD.app/Contents/Resources

# Imput dwg the output is BMP
# Define a default priority for the transformer
content.transformer.dwg2bmp.priority=50

# List the transformations that are supported

content.transformer.dwg2bmp.extensions.dwg.bmp.supported=true
content.transformer.dwg2bmp.extensions.dwg.bmp.priority=50



Log file
========


2016-01-16 09:52:27,390  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: image/jpeg
   transformers: []
2016-01-16 09:52:27,391  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: image/jpeg
   transformers: []
2016-01-16 09:52:27,393  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: image/jpeg
   transformers: []
2016-01-16 09:52:27,393  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: image/png
   transformers: []
2016-01-16 09:52:27,395  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: image/jpeg
   transformers: []
2016-01-16 09:52:27,395  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: application/pdf
   transformers: []
2016-01-16 09:52:27,396  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: image/jpeg
   transformers: []
2016-01-16 09:52:27,396  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: image/jpeg
   transformers: []
2016-01-16 09:52:27,397  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: image/jpeg
   transformers: []
2016-01-16 09:52:27,397  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: image/png
   transformers: []

2016-01-16 09:52:27,400  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: image/jpeg
   transformers: []
2016-01-16 09:52:27,400  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: application/x-shockwave-flash
   transformers: []
2016-01-16 09:52:27,402  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: image/jpeg
   transformers: []
2016-01-16 09:52:27,403  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8080-exec-1] Searched for transformer:
   source mimetype: image/vnd.dwg
   target mimetype: image/png
   transformers: []




Thanks and Regards,

Imrul

Outcomes