为什么在露天生成自定义缩略图会产生0字节文件?

时间:2013-10-10 13:55:44

标签: thumbnails alfresco

我正在尝试在小面板中显示我的自定义注册缩略图,但在检查变压器日志时,我看到了

   command:    /usr/local/bin/convert /usr/local/repo-tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_source_2302998811594124920.pdf -auto-orient -resize 210x210 /usr/local/repo-tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_target_8173139798695011351.png
   succeeded:  true
   exit code:  0
   out:        
   err:        
 2013-10-10 15:46:04,029  DEBUG [content.transform.TransformerDebug] [http-bio-9090-exec-4] 0           Finished in 3 396 ms

 2013-10-10 15:46:04,306  DEBUG [jscript.RhinoScriptProcessor.calls] [http-bio-9090-exec-4] thumbnail.get.js End 3890 ms
 2013-10-10 15:46:04,306  DEBUG [scripts.content.StreamContent] [http-bio-9090-exec-4] Retrieving content from node ref workspace://SpacesStore/e4acdfc2-3dbb-4f10-974f-6077f62abbf4 (property: {http://www.alfresco.org/model/content/1.0}content) (attach: false)
 2013-10-10 15:46:04,309  DEBUG [web.scripts.RepositoryContainer] [http-bio-9090-exec-4] End retry transaction block: required,readwrite
 2013-10-10 15:46:04,333  DEBUG [content.transform.TransformerDebug] [http-bio-9090-exec-4] 1           pdf  txt  L_ESSENTIEL_2013.pdf 790.2 KB ADMLuceneIndexer
 2013-10-10 15:46:04,334  DEBUG [content.transform.TransformerDebug] [http-bio-9090-exec-4] 1           **a) transformer.PdfBox           0 ms
 2013-10-10 15:46:04,334  DEBUG [content.transform.TransformerDebug] [http-bio-9090-exec-4] 1.1         pdf  txt  L_ESSENTIEL_2013.pdf 790.2 KB transformer.PdfBox
 2013-10-10 15:46:05,679  DEBUG [content.transform.TransformerDebug] [http-bio-9090-exec-4] 1           Finished in 1 347 ms

 2013-10-10 15:46:05,689  DEBUG [content.transform.TransformerDebug] [http-bio-9090-exec-4] 2           png  txt  pdfThumbs 0 bytes ADMLuceneIndexer NO transformers
 2013-10-10 15:46:05,689  DEBUG [content.transform.TransformerDebug] [http-bio-9090-exec-4] 2           Finished in 1 ms Transformer NOT called

pdf的拇指是0字节,我不知道为什么。关于缩略图bean本身我没有任何错误。 以下是我对缩略图bean的上下文定义:

<bean id="pdfThumbnailDefinitionDoclib" class="fr.test.thumbnails.CustomThumbnailBootsrap" depends-on="ThumbnailService" init-method="init">
    <property name="thumbnailService" ref="ThumbnailService" />
    <property name="thumbnailDefinitions">
        <list>
            <bean class="org.alfresco.repo.thumbnail.ThumbnailDefinition">
                    <property name="name" value="pdfThumbs" />
                    <property name="mimetype" value="image/png"/>
                    <property name="transformationOptions">
                            <bean class="org.alfresco.repo.content.transform.magick.ImageTransformationOptions">
                                    <property name="resizeOptions">
                                            <bean class="org.alfresco.repo.content.transform.magick.ImageResizeOptions">
                                                    <property name="height" value="210"/>
                                                    <property name="width" value="210" />
                                                    <property name="maintainAspectRatio" value="true"/>
                                                    <property name="resizeToThumbnail" value="false" />
                                            </bean>
                                    </property>
                            </bean>
                    </property>
                    <property name="runAs" value="System"/>
                    <property name="placeHolderResourcePath" value="alfresco/extension/thumbnail/thumbnail_placeholder_scImageThumbnail.png" />
            </bean>
        </list> 
    </property>
</bean>

代码主要改编自jpotts ecma网站(http://ecmarchitect.com/archives/2009/03/03/913链接不允许)。所以java bean类似于副本,类名和包

除外

0 个答案:

没有答案