cancel
Showing results for 
Search instead for 
Did you mean: 

Create Thumbnail for mutipage PDF

beslan
Champ in-the-making
Champ in-the-making
Hi,

I need to create thumbnail images for PDF files. For single page PDFs its working and create image file. But when I try a multipage pdf its throws fallowing error.

Thanks.
Beslan

Alfresco version : 4.2b
tested imagemagick versions : 6.5.6 (from Alfresco installation), 6.7.9-10, 6.8.6-2-Q16


org.alfresco.service.cmr.repository.ContentIOException: 06020206 Content conversion failed:    reader: ContentAccessor[ contentUrl=store://2013/7/2/15/13/38cbe73c-ffb1-49ff-84ee-fa0ef96c3704.bin, mimetype=application/pdf, size=44758, encoding=UTF-8, locale=en_US]   writer: ContentAccessor[ contentUrl=store://C:\Users\BCELIK~1\AppData\Local\Temp\Alfresco\FailoverTransformer_intermediate_FailoverContentTransformer_1472995727698926837.jpg, mimetype=image/jpeg, size=0, encoding=UTF-8, locale=en_US]   options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/2b155b59-73fb-424a-a9ab-c779c5e70aba, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=200, height=200, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=true], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=-1, pageLimit=-1, readLimitTimeMs=-1}   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:272)   at org.alfresco.repo.content.ContentServiceImpl.failoverTransformers(ContentServiceImpl.java:680)   at org.alfresco.repo.content.ContentServiceImpl.transform(ContentServiceImpl.java:629)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   at java.lang.reflect.Method.invoke(Method.java:601)   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)   at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.model.ml.MLContentInterceptor.invoke(MLContentInterceptor.java:125)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)   at $Proxy95.transform(Unknown Source)   at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine.render(AbstractTransformationRenderingEngine.java:126)   at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeRenditionImpl(AbstractRenderingEngine.java:501)   at org.alfresco.repo.rendition.executer.AbstractRenderingEngine$1.doWork(AbstractRenderingEngine.java:425)   at org.alfresco.repo.rendition.executer.AbstractRenderingEngine$1.doWork(AbstractRenderingEngine.java:408)   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:529)   at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeImpl(AbstractRenderingEngine.java:407)   at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeImpl(AbstractRenderingEngine.java:369)   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:242)   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:822)   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:723)   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:557)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   at java.lang.reflect.Method.invoke(Method.java:601)   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)   at $Proxy81.executeAction(Unknown Source)   at org.alfresco.repo.rendition.RenditionServiceImpl.executeRenditionAction(RenditionServiceImpl.java:336)   at org.alfresco.repo.rendition.RenditionServiceImpl.render(RenditionServiceImpl.java:199)   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnailNode(ThumbnailServiceImpl.java:591)   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.access$000(ThumbnailServiceImpl.java:67)   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1.doWork(ThumbnailServiceImpl.java:265)   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1.doWork(ThumbnailServiceImpl.java:262)   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:529)   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnail(ThumbnailServiceImpl.java:261)   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnail(ThumbnailServiceImpl.java:225)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   at java.lang.reflect.Method.invoke(Method.java:601)   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)   at $Proxy163.createThumbnail(Unknown Source)   at com.universal.alfresco.api.ContentManagerApiImpl.createThumbnail(ContentManagerApiImpl.java:1811)   at com.universal.alfresco.api.ContentManagerApiImpl.uploadContent(ContentManagerApiImpl.java:981)   at com.universal.alfresco.api.ContentManagerApiImpl.uploadContent(ContentManagerApiImpl.java:912)   at controller.AddContent.addContent(AddContent.java:592)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   at java.lang.reflect.Method.invoke(Method.java:601)   at org.apache.el.parser.AstValue.invoke(AstValue.java:264)   at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)   at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)   at javax.faces.component.UICommand.broadcast(UICommand.java:387)   at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:324)   at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:299)   at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:256)   at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:469)   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)   at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)   at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)   at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)   at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)   at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)   at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)   at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)   at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)   at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)   at java.lang.Thread.run(Thread.java:722)Caused by: org.alfresco.service.cmr.repository.ContentIOException: 06020205 Content conversion failed:    reader: ContentAccessor[ contentUrl=store://2013/7/2/15/13/38cbe73c-ffb1-49ff-84ee-fa0ef96c3704.bin, mimetype=application/pdf, size=44758, encoding=UTF-8, locale=en_US]   writer: ContentAccessor[ contentUrl=store://C:\Users\BCELIK~1\AppData\Local\Temp\Alfresco\FailoverTransformer_intermediate_ComplexContentTransformer_6916778363378296966.jpg, mimetype=image/jpeg, size=0, encoding=UTF-8, locale=en_US]   options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/2b155b59-73fb-424a-a9ab-c779c5e70aba, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=200, height=200, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=true], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=-1, pageLimit=-1, readLimitTimeMs=-1}   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:272)   at org.alfresco.repo.content.transform.FailoverContentTransformer.transformInternal(FailoverContentTransformer.java:201)   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:238)   … 130 moreCaused by: org.alfresco.service.cmr.repository.ContentIOException: 06020204 Content conversion failed:    reader: ContentAccessor[ contentUrl=store://2013/7/2/15/13/38cbe73c-ffb1-49ff-84ee-fa0ef96c3704.bin, mimetype=application/pdf, size=44758, encoding=UTF-8, locale=en_US]   writer: ContentAccessor[ contentUrl=store://C:\Users\BCELIK~1\AppData\Local\Temp\Alfresco\ComplextTransformer_intermediate_pdf_2406880542578130199.png, mimetype=image/png, size=0, encoding=UTF-8, locale=en_US]   options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/2b155b59-73fb-424a-a9ab-c779c5e70aba, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=200, height=200, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=true], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=-1, pageLimit=-1, readLimitTimeMs=-1}   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:272)   at org.alfresco.repo.content.transform.ComplexContentTransformer.transformInternal(ComplexContentTransformer.java:486)   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:238)   … 132 moreCaused by: org.alfresco.service.cmr.repository.ContentIOException: 06020203 Failed to perform ImageMagick transformation: Execution result:    os:         Windows 7   command:    [C:/UniArsivDev/imagemagick/convert.exe, C:\Users\BCELIK~1\AppData\Local\Temp\Alfresco\ImageMagickContentTransformerWorker_source_7349285776332952358.pdf, -auto-orient, -resize, 200x200, C:\Users\BCELIK~1\AppData\Local\Temp\Alfresco\ImageMagickContentTransformerWorker_target_3632435031922504582.png]   succeeded:  false   exit code:  2   out:           err:        Cannot run program "C:/UniArsivDev/imagemagick/convert.exe": CreateProcess error=2, The system cannot find the file specified   at org.alfresco.repo.content.transform.magick.ImageMagickContentTransformerWorker.transformInternal(ImageMagickContentTransformerWorker.java:183)   at org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker.transform(AbstractImageMagickContentTransformerWorker.java:249)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   at java.lang.reflect.Method.invoke(Method.java:601)   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:72)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)   at $Proxy51.transform(Unknown Source)   at org.alfresco.repo.content.transform.ProxyContentTransformer.transformInternal(ProxyContentTransformer.java:77)   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:238)   … 134 more‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


5 REPLIES 5

afaust
Legendary Innovator
Legendary Innovator
Hello,

does your convert.exe really reside in that directory? Have you setup a specific user to run the Alfresco / Tomcat service and can that user see / execute the convert.exe in that directory?

The error message is pretty straight forward… For single-page PDF, I assume another transformer is used, e.g. PDFToImage from PDFBox, which does not start a sub-process.

Regards
Axel

beslan
Champ in-the-making
Champ in-the-making
Hi Axel,

You are right. It's wrong error message, sorry.
Fallowing message is correct error message.

Thanks,
Beslan

org.alfresco.service.cmr.repository.ContentIOException: 06050044 Content conversion failed:    reader: ContentAccessor[ contentUrl=store://2013/7/5/10/48/bc75bd75-06fe-4e1a-a1ee-f2c08f3114db.bin, mimetype=application/pdf, size=84665, encoding=UTF-8, locale=en_US]   writer: ContentAccessor[ contentUrl=store://C:\Users\BCELIK~1\AppData\Local\Temp\Alfresco\FailoverTransformer_intermediate_FailoverContentTransformer_3829057990155992422.jpg, mimetype=image/jpeg, size=0, encoding=UTF-8, locale=en_US]   options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/4228db0c-05bb-4190-b02f-390eaf982abe, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=200, height=200, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=true], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=-1, pageLimit=-1, readLimitTimeMs=-1}   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:272)   at org.alfresco.repo.content.ContentServiceImpl.failoverTransformers(ContentServiceImpl.java:680)   at org.alfresco.repo.content.ContentServiceImpl.transform(ContentServiceImpl.java:629)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   at java.lang.reflect.Method.invoke(Method.java:601)   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)   at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.model.ml.MLContentInterceptor.invoke(MLContentInterceptor.java:125)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)   at $Proxy95.transform(Unknown Source)   at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine.render(AbstractTransformationRenderingEngine.java:126)   at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeRenditionImpl(AbstractRenderingEngine.java:501)   at org.alfresco.repo.rendition.executer.AbstractRenderingEngine$1.doWork(AbstractRenderingEngine.java:425)   at org.alfresco.repo.rendition.executer.AbstractRenderingEngine$1.doWork(AbstractRenderingEngine.java:408)   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:529)   at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeImpl(AbstractRenderingEngine.java:407)   at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeImpl(AbstractRenderingEngine.java:369)   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:242)   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:822)   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:723)   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:557)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   at java.lang.reflect.Method.invoke(Method.java:601)   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)   at $Proxy81.executeAction(Unknown Source)   at org.alfresco.repo.rendition.RenditionServiceImpl.executeRenditionAction(RenditionServiceImpl.java:336)   at org.alfresco.repo.rendition.RenditionServiceImpl.render(RenditionServiceImpl.java:199)   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnailNode(ThumbnailServiceImpl.java:591)   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.access$000(ThumbnailServiceImpl.java:67)   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1.doWork(ThumbnailServiceImpl.java:265)   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1.doWork(ThumbnailServiceImpl.java:262)   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:529)   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnail(ThumbnailServiceImpl.java:261)   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnail(ThumbnailServiceImpl.java:225)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   at java.lang.reflect.Method.invoke(Method.java:601)   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)   at $Proxy163.createThumbnail(Unknown Source)   at com.universal.alfresco.api.ContentManagerApiImpl.createThumbnail(ContentManagerApiImpl.java:1811)   at com.universal.alfresco.api.ContentManagerApiImpl.uploadContent(ContentManagerApiImpl.java:981)   at com.universal.alfresco.api.ContentManagerApiImpl.uploadContent(ContentManagerApiImpl.java:912)   at controller.AddContent.addContent(AddContent.java:592)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   at java.lang.reflect.Method.invoke(Method.java:601)   at org.apache.el.parser.AstValue.invoke(AstValue.java:264)   at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)   at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)   at javax.faces.component.UICommand.broadcast(UICommand.java:387)   at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:324)   at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:299)   at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:256)   at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:469)   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)   at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)   at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)   at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)   at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)   at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)   at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)   at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)   at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)   at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)   at java.lang.Thread.run(Thread.java:722)Caused by: org.alfresco.service.cmr.repository.ContentIOException: 06050043 Content conversion failed:    reader: ContentAccessor[ contentUrl=store://2013/7/5/10/48/bc75bd75-06fe-4e1a-a1ee-f2c08f3114db.bin, mimetype=application/pdf, size=84665, encoding=UTF-8, locale=en_US]   writer: ContentAccessor[ contentUrl=store://C:\Users\BCELIK~1\AppData\Local\Temp\Alfresco\FailoverTransformer_intermediate_ComplexContentTransformer_1963609347575028063.jpg, mimetype=image/jpeg, size=0, encoding=UTF-8, locale=en_US]   options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/4228db0c-05bb-4190-b02f-390eaf982abe, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=200, height=200, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=true], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=-1, pageLimit=-1, readLimitTimeMs=-1}   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:272)   at org.alfresco.repo.content.transform.FailoverContentTransformer.transformInternal(FailoverContentTransformer.java:201)   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:238)   … 130 moreCaused by: org.alfresco.service.cmr.repository.ContentIOException: 06050042 Content conversion failed:    reader: ContentAccessor[ contentUrl=store://C:\Users\BCELIK~1\AppData\Local\Temp\Alfresco\ComplextTransformer_intermediate_pdf_3187576531716435100.png, mimetype=image/png, size=0, encoding=UTF-8, locale=en_US]   writer: ContentAccessor[ contentUrl=store://C:\Users\BCELIK~1\AppData\Local\Temp\Alfresco\FailoverTransformer_intermediate_ComplexContentTransformer_1963609347575028063.jpg, mimetype=image/jpeg, size=0, encoding=UTF-8, locale=en_US]   options: {targetContentProperty=null, contentReaderNodeRef=null, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=200, height=200, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=true], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=-1, pageLimit=-1, readLimitTimeMs=-1}   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:272)   at org.alfresco.repo.content.transform.ComplexContentTransformer.transformInternal(ComplexContentTransformer.java:486)   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:238)   … 132 moreCaused by: org.alfresco.service.cmr.repository.ContentIOException: 06050041 Failed to perform ImageMagick transformation: Execution result:    os:         Windows 7   command:    [C:/UniArsivDev/imagemagick/convert.exe, C:\Users\BCELIK~1\AppData\Local\Temp\Alfresco\ImageMagickContentTransformerWorker_source_6377049285797650377.png, -auto-orient, -resize, 200x200, C:\Users\BCELIK~1\AppData\Local\Temp\Alfresco\ImageMagickContentTransformerWorker_target_6808839998507643449.jpg]   succeeded:  false   exit code:  1   out:           err:        convert.exe: Improper image header `C:\Users\BCELIK~1\AppData\Local\Temp\Alfresco\ImageMagickContentTransformerWorker_source_6377049285797650377.png' @ png.c/ReadPNGImage/2895.convert.exe: missing an image filename `C:\Users\BCELIK~1\AppData\Local\   at org.alfresco.repo.content.transform.magick.ImageMagickContentTransformerWorker.transformInternal(ImageMagickContentTransformerWorker.java:183)   at org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker.transform(AbstractImageMagickContentTransformerWorker.java:249)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   at java.lang.reflect.Method.invoke(Method.java:601)   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:72)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)   at $Proxy51.transform(Unknown Source)   at org.alfresco.repo.content.transform.ProxyContentTransformer.transformInternal(ProxyContentTransformer.java:77)   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:238)   … 134 more‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

beslan
Champ in-the-making
Champ in-the-making
Hi,

I think I found the problem. My default imagemagick package (from alfresco installation) has a problem with ghostscript.
I'll try latest version of imagemagick and ghostscript.

Thanks,
Beslan

beslan
Champ in-the-making
Champ in-the-making
Problem is AbstractImageMagickContentTransformerWorker transform method always expected one file when imagemagick returns 0.

        transformInternal(sourceFile, targetFile, options);                // check that the file was created        if (!targetFile.exists())        {            throw new ContentIOException("JMagick transformation failed to write output file");        }        // upload the output image        writer.putContent(targetFile);‍‍‍‍‍‍‍‍‍‍‍


But first file (target file) has 0 byte. I will check jira for this bug.

Thnaks,
Beslan

beslan
Champ in-the-making
Champ in-the-making
Hi,

Problem solved. Multipage pdfto one png can be done with a imagemagick parameter.

imageTransformationOptions.setCommandOptions(" -append ");‍‍‍


With this parameter imagemagick created one image and pages apended verically.
Adding a page limit is a good idea for large files.

Thanks,
Beslan.
Welcome to the new Hyland Connect. Get started or submit feedback.