我正在尝试在仪表板中显示我的自定义注册缩略图,但是在检查变压器日志时,我看到了
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是一个like for like copy,除了类名和包