AnsweredAssumed Answered

Convert tiff to pdf- Imagemagick

Question asked by cmarguello on Mar 3, 2011
Latest reply on Mar 19, 2013 by bowman
Hi.
I install bundle of Alfresco 3.4d in SO Linux CentOS 5.
I try to follow the post http://fabiostrozzi.eu/2010/10/27/improving-tiff-preview-in-alfresco-share/comment-page-1/#comment-1644
to preview miltitiff files in alfresco share.

In my pc (windows 7) it works fine, but in linux i have an error, and cant convert tiff to pdf.
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 02030002 Transformation failed - status indicates an error:
Execution result:
   os:         Linux
   command:    [/usr/bin/convert, /opt/alfresco/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_source_4046133335292402124.tiff, /opt/alfresco/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_target_5314728622864988675.pdf]
   succeeded:  false
   exit code:  1
   out:       
   err:        convert: no decode delegate for this image format `/opt/alfresco/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_source_4046133335292402124.tiff' @ error/constitute.c/ReadImage/532.
convert: missing an image filename `/opt/alfresco/tom
        at org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker.transform(RuntimeExecutableContentTransformerWorker.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:71)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy40.transform(Unknown Source)
        at org.alfresco.repo.content.transform.ProxyContentTransformer.transformInternal(ProxyContentTransformer.java:68)
        at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:161)
        … 127 more

if i execute the the next command it works:
/usr/bin/convert /opt/alfresco/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_source_4046133335292402124.tiff /opt/alfresco/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_target_5314728622864988675.pdf

But Alfresco dont.

I install new version of imagemagick. thats why the convert path is in /usr/bin/convert

Also i try in alfresco web client.
I create a Rule Action:
Conditions:   Item has a mimetype of 'TIFF Image'
Actions:   Copies content to 'documentLibrary' and transforms to 'Adobe PDF Document'

But when i upload a tiff content i have an error:
Error  Please correct the errors below then click OK.

    * Failed to create content due to error: 02030008 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2011/3/3/9/20/9dfa7aa2-94d1-40d7-8340-df85ebdad0ff.bin, mimetype=image/tiff, size=560532, encoding=UTF-8, locale=en_US] writer: ContentAccessor[ contentUrl=store://2011/3/3/9/20/260b7870-6fc4-4b0f-8942-301b39ae6b27.bin, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_US] options: org.alfresco.service.cmr.repository.TransformationOptions@154222b

So, anyone knows what happend?
Why in windows works an in my linux dont?

Thanks in advance

Outcomes