La prévisualisation des PDF se fait en PNG

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

La prévisualisation des PDF se fait en PNG

Bonjour,

J'ai installé Alfresco 4 Community et les dépdences tierce-partie sur une VM ubuntu.
Les binaires de pdf2swf, ImageMagick et OpenOffice.org sont bien trouvé et tout fonctionne bien pour générer la previsualisation des documents bureautiques sous la forme de flash.

Cependant lorsque j'insère un PDF, simple ou complexe je n'ai pas de player flash qui affiche la prévisualisation, mais une image PNG à la place.

Alfresco n'a pas l'air de trouver le transformer de pdf vers flash, voici ce que je peux trouver dan les logs :

Au démarrage :
2012-02-23 16:16:19,772  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ProxyContentTransformer[ average=0ms]
2012-02-23 16:16:23,082  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: PdfToImageContentTransformer[ average=0ms]
2012-02-23 16:16:23,104  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: PdfBoxPdfToImageContentTransformer[ average=0ms]
2012-02-23 16:16:23,111  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: StringExtractingContentTransformer[ average=0ms]
2012-02-23 16:16:23,119  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: BinaryPassThroughContentTransformer[ average=0ms]
2012-02-23 16:16:23,129  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: AppleIWorksContentTransformer[ average=0ms]
2012-02-23 16:16:23,138  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: PdfBoxContentTransformer[ average=0ms]
2012-02-23 16:16:23,146  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: FailoverContentTransformer[ average=0ms]
2012-02-23 16:16:23,155  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ComplexContentTransformer[ average=0ms]
2012-02-23 16:16:23,158  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ComplexContentTransformer[ average=0ms]
2012-02-23 16:16:23,161  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ComplexContentTransformer[ average=0ms]
2012-02-23 16:16:23,168  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ProxyContentTransformer[ average=0ms]
2012-02-23 16:16:23,169  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ComplexContentTransformer[ average=0ms]
2012-02-23 16:16:23,476  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: TextToPdfContentTransformer[ average=0ms]
2012-02-23 16:16:23,477  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ComplexContentTransformer[ average=0ms]
2012-02-23 16:16:23,495  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: TikaAutoContentTransformer[ average=0ms]
2012-02-23 16:16:23,502  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: PoiHssfContentTransformer[ average=0ms]
2012-02-23 16:16:23,509  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: PoiContentTransformer[ average=0ms]
2012-02-23 16:16:23,516  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: PoiOOXMLContentTransformer[ average=0ms]
2012-02-23 16:16:23,525  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: TextMiningContentTransformer[ average=0ms]
2012-02-23 16:16:23,537  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: HtmlParserContentTransformer[ average=0ms]
2012-02-23 16:16:23,544  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: MediaWikiContentTransformer[ average=0ms]
2012-02-23 16:16:23,546  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ComplexContentTransformer[ average=0ms]
2012-02-23 16:16:23,553  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: MailContentTransformer[ average=0ms]
2012-02-23 16:16:23,554  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ComplexContentTransformer[ average=0ms]
2012-02-23 16:16:23,577  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: EMLTransformer[ average=0ms]
2012-02-23 16:16:23,584  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ArchiveContentTransformer[ average=0ms]
2012-02-23 16:16:26,373  WARN  [alfresco.util.AbstractTriggerBean] [main] Job ehCacheTracerJob is not active/enabled
2012-02-23 16:16:27,128  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ProxyContentTransformer[ average=0ms]
2012-02-23 16:16:27,128  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ComplexContentTransformer[ average=0ms]
2012-02-23 16:16:27,129  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ComplexContentTransformer[ average=0ms]
2012-02-23 16:16:27,129  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ComplexContentTransformer[ average=0ms]
2012-02-23 16:16:27,130  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ComplexContentTransformer[ average=0ms]
2012-02-23 16:16:27,130  DEBUG [content.transform.ContentTransformerRegistry] [main] Registered general transformer:
   transformer: ComplexContentTransformer[ average=0ms]

Lors de l'ajout et la visualisation d'un PDF :
2012-02-23 16:19:03,156  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-1] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-23 16:19:07,243  ERROR [pdfbox.filter.FlateFilter] [http-8080-1] Stop reading corrupt stream
2012-02-23 16:19:13,027  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-1] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: text/plain
   transformers: [PdfBoxContentTransformer[ average=10861ms]]
2012-02-23 16:19:13,028  DEBUG [content.transform.TransformerDebug] [http-8080-1] 3         store://2012/2/23/16/19/ccc6c185-632e-4223-a570-8aa8bfcab87e.bin
2012-02-23 16:19:13,029  DEBUG [content.transform.TransformerDebug] [http-8080-1] 3         pdf  txt  1 956K ADMLuceneIndexer
2012-02-23 16:19:13,029  DEBUG [content.transform.TransformerDebug] [http-8080-1] 3         **a) transformer.PdfBox 10861 ms
2012-02-23 16:19:13,033  DEBUG [content.transform.TransformerDebug] [http-8080-1] 3         Run later. Transformer average (10861 ms) > 20 ms
2012-02-23 16:19:13,034  DEBUG [content.transform.TransformerDebug] [http-8080-1] 3         Finished in 7 ms Transformer NOT called

2012-02-23 16:19:13,473  DEBUG [content.transform.ContentTransformerRegistry] [defaultAsyncAction1] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-23 16:19:13,556  DEBUG [content.transform.ContentTransformerRegistry] [defaultAsyncAction1] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-23 16:19:13,559  DEBUG [content.transform.ContentTransformerRegistry] [defaultAsyncAction1] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-23 16:19:13,560  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 4         store://2012/2/23/16/19/ccc6c185-632e-4223-a570-8aa8bfcab87e.bin
2012-02-23 16:19:13,561  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 4         pdf  png  1 956K ContentService.transform(…)
2012-02-23 16:19:13,568  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 4         **a) transformer.complex.PDF.Image<<Complex>> 0 ms
2012-02-23 16:19:13,570  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 4.1       pdf  png  1 956K transformer.PdfToImage<<Failover>>
2012-02-23 16:19:13,571  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 4.1.1     pdf  png  1 956K failover.transformer.PdfRenderer.PdfToImage
2012-02-23 16:19:19,877  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 4.2       png  png  55K transformer.ImageMagick<<Proxy>>
2012-02-23 16:19:21,050  DEBUG [util.exec.RuntimeExec] [defaultAsyncAction1] Execution result:
   os:         Linux
   command:    [/usr/bin/convert, /tmp/tomcat6-tmp/Alfresco/ImageMagickContentTransformerWorker_source_1558485927324705196.png[0], -auto-orient, -resize, 100x100>, /tmp/tomcat6-tmp/Alfresco/ImageMagickContentTransformerWorker_target_7828528430730206765.png]
   succeeded:  true
   exit code:  0
   out:
   err:
2012-02-23 16:19:21,100  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 4         Finished in 7541 ms

2012-02-23 16:19:21,672  DEBUG [content.transform.ContentTransformerRegistry] [defaultAsyncAction1] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: text/plain
   transformers: [PdfBoxContentTransformer[ average=10861ms]]
2012-02-23 16:19:23,103  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 5         store://2012/2/23/16/19/ccc6c185-632e-4223-a570-8aa8bfcab87e.bin
2012-02-23 16:19:23,104  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 5         pdf  txt  1 956K ADMLuceneIndexer
2012-02-23 16:19:23,104  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 5         **a) transformer.PdfBox 10861 ms
2012-02-23 16:19:23,105  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 5         Run later. Transformer average (10861 ms) > 20 ms
2012-02-23 16:19:23,105  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 5         Finished in 1434 ms Transformer NOT called

2012-02-23 16:19:23,109  DEBUG [content.transform.ContentTransformerRegistry] [defaultAsyncAction1] Searched for transformer:
   source mimetype: image/png
   target mimetype: text/plain
   transformers: []
2012-02-23 16:19:23,110  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 6         store://2012/2/23/16/19/f7b6dac2-aa02-4e94-b16f-64ff53e8006d.bin
2012-02-23 16:19:23,111  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 6         png  txt  3K ADMLuceneIndexer NO transformers
2012-02-23 16:19:23,111  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction1] 6         Finished in 2 ms Transformer NOT called

2012-02-23 16:19:39,925  DEBUG [content.transform.ContentTransformerRegistry] [DefaultScheduler_Worker-5] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: text/plain
   transformers: [PdfBoxContentTransformer[ average=10861ms]]
2012-02-23 16:19:39,926  DEBUG [content.transform.TransformerDebug] [DefaultScheduler_Worker-5] 7         store://2012/2/23/16/19/ccc6c185-632e-4223-a570-8aa8bfcab87e.bin
2012-02-23 16:19:39,926  DEBUG [content.transform.TransformerDebug] [DefaultScheduler_Worker-5] 7         pdf  txt  1 956K ADMLuceneIndexer
2012-02-23 16:19:39,927  DEBUG [content.transform.TransformerDebug] [DefaultScheduler_Worker-5] 7         **a) transformer.PdfBox 10861 ms
2012-02-23 16:19:42,775  ERROR [pdfbox.filter.FlateFilter] [DefaultScheduler_Worker-5] Stop reading corrupt stream
2012-02-23 16:19:49,727  DEBUG [content.transform.TransformerDebug] [DefaultScheduler_Worker-5] 7         Finished in 9803 ms

2012-02-23 16:19:57,413  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-21] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=7530ms]]
2012-02-23 16:19:57,414  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-21] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=7530ms]]
2012-02-23 16:19:57,418  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-21] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: application/x-shockwave-flash
   transformers: []
2012-02-23 16:19:57,419  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-21] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=7530ms]]
2012-02-23 16:19:57,421  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-21] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: image/jpeg
   transformers: [ComplexContentTransformer[ average=7530ms]]
2012-02-23 16:19:57,421  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-21] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=7530ms]]
2012-02-23 16:20:02,074  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-2] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=7530ms]]
2012-02-23 16:20:02,194  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-2] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=7530ms]]
2012-02-23 16:20:02,212  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-2] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=7530ms]]
2012-02-23 16:20:02,217  DEBUG [content.transform.TransformerDebug] [http-8080-2] 8         store://2012/2/23/16/19/ccc6c185-632e-4223-a570-8aa8bfcab87e.bin
2012-02-23 16:20:02,217  DEBUG [content.transform.TransformerDebug] [http-8080-2] 8         pdf  png  1 956K ContentService.transform(…)
2012-02-23 16:20:02,218  DEBUG [content.transform.TransformerDebug] [http-8080-2] 8         **a) transformer.complex.PDF.Image<<Complex>> 7530 ms
2012-02-23 16:20:02,244  DEBUG [content.transform.TransformerDebug] [http-8080-2] 8.1       pdf  png  1 956K transformer.PdfToImage<<Failover>>
2012-02-23 16:20:02,245  DEBUG [content.transform.TransformerDebug] [http-8080-2] 8.1.1     pdf  png  1 956K failover.transformer.PdfRenderer.PdfToImage
2012-02-23 16:20:08,958  DEBUG [content.transform.TransformerDebug] [http-8080-2] 8.2       png  png  55K transformer.ImageMagick<<Proxy>>
2012-02-23 16:20:09,786  DEBUG [util.exec.RuntimeExec] [http-8080-2] Execution result:
   os:         Linux
   command:    [/usr/bin/convert, /tmp/tomcat6-tmp/Alfresco/ImageMagickContentTransformerWorker_source_4921276759010063988.png[0], -auto-orient, -resize, 480x480>, /tmp/tomcat6-tmp/Alfresco/ImageMagickContentTransformerWorker_target_4661649280639093430.png]
   succeeded:  true
   exit code:  0
   out:
   err:
2012-02-23 16:20:09,823  DEBUG [content.transform.TransformerDebug] [http-8080-2] 8         Finished in 7611 ms

2012-02-23 16:20:11,517  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-2] Searched for transformer:
   source mimetype: image/png
   target mimetype: text/plain
   transformers: []
2012-02-23 16:20:11,521  DEBUG [content.transform.TransformerDebug] [http-8080-2] 9         store://2012/2/23/16/20/bcfb63c1-4b0e-48d7-a0bc-4e9c1226e88c.bin
2012-02-23 16:20:11,521  DEBUG [content.transform.TransformerDebug] [http-8080-2] 9         png  txt  24K ADMLuceneIndexer NO transformers
2012-02-23 16:20:11,522  DEBUG [content.transform.TransformerDebug] [http-8080-2] 9         Finished in 5 ms Transformer NOT called


Je suis interpelé par les éléments suivant dans le log :

2012-02-23 16:19:42,775  ERROR [pdfbox.filter.FlateFilter] [DefaultScheduler_Worker-5] Stop reading corrupt stream
et
2012-02-23 16:19:57,418  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-21] Searched for transformer:
   source mimetype: application/pdf
   target mimetype: application/x-shockwave-flash
   transformers: []

Je n'ai pas ce problème avec une 4 Community installée via l'installer sur macOs.
Le PDF ne génère pas d'erreur lorsque je le donne en argument à pdf2swf manuellement et el swf est bien généré.

Je n'ai fais aucune modification à Alfresco à part l'isntallation d'un AMP qui rajoute un aspect au modèle.

Merci pour votre aide.
8 Replies
Highlighted
Active Member II

Re: La prévisualisation des PDF se fait en PNG

Bonjour,

pouvez-vous nous montrer la configuration d'Alfresco pour pdf2swf  (paramètre swf.exe dans alfresco-global.properties) ?

MErci
Highlighted
Member II

Re: La prévisualisation des PDF se fait en PNG

Bonjour Romain,

Voici le contenu de mon fichier alfresco-global.properties :

#
# External locations
#————-
ooo.exe=/opt/openoffice.org3/program/soffice.bin
ooo.enabled=true
jodconverter.officeHome=./OpenOffice.org
jodconverter.portNumbers=8101
jodconverter.enabled=false
img.root=/usr
img.exe=${img.root}/bin/convert
swf.exe=/usr/local/bin/pdf2swf

J'ai comparé le contenu du fichier alfresco-global.properties avec celui qui a été installé avec l'installer et il n'y a pas de différences notables. Afin de mettre de côté tout problème pouvant venir de la configuration dans le war j'ai également utilisé le war de la version installée avec l'installer et le résultat est le même. (La version installée avec l'installer fonctionne à ce niveau)

Pour information, voici le log généré lorsque je dépose un fichier MS office :

2012-02-24 11:26:51,448  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-13] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
log4j:ERROR Failed to rename [alfresco.log] to [alfresco.log.2012-02-23].
2012-02-24 11:26:57,478  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-13] Searched for transformer:
   source mimetype: application/msword
   target mimetype: text/plain
   transformers: [TextMiningContentTransformer[ average=0ms]]
2012-02-24 11:26:57,479  DEBUG [content.transform.TransformerDebug] [http-8080-13] 14         store://2012/2/24/11/26/c0935f32-f20e-4367-8f63-b6ef7d3c3424.bin
2012-02-24 11:26:57,480  DEBUG [content.transform.TransformerDebug] [http-8080-13] 14         doc  txt  94K ADMLuceneIndexer
2012-02-24 11:26:57,480  DEBUG [content.transform.TransformerDebug] [http-8080-13] 14         **a) transformer.TextMining 0 ms
2012-02-24 11:26:57,604  DEBUG [content.transform.TransformerDebug] [http-8080-13] 14         Finished in 126 ms

2012-02-24 11:26:58,067  DEBUG [content.transform.ContentTransformerRegistry] [defaultAsyncAction2] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:26:58,241  DEBUG [content.transform.ContentTransformerRegistry] [defaultAsyncAction2] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:26:58,262  DEBUG [content.transform.ContentTransformerRegistry] [defaultAsyncAction2] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:26:58,263  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction2] 15         store://2012/2/24/11/26/c0935f32-f20e-4367-8f63-b6ef7d3c3424.bin
2012-02-24 11:26:58,264  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction2] 15         doc  png  94K ContentService.transform(…)
2012-02-24 11:26:58,264  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction2] 15         **a) transformer.complex.OpenOffice.Image<<Complex>> 0 ms
2012-02-24 11:26:58,265  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction2] 15.1       doc  pdf  94K transformer.OpenOffice<<Proxy>>
2012-02-24 11:27:35,912  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-24] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:27:36,902  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-13] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:27:38,203  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-5] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:27:56,889  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-13] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:27:57,342  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-5] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:27:57,358  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-5] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:27:57,359  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-5] Searched for transformer:
   source mimetype: application/msword
   target mimetype: application/x-shockwave-flash
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:27:57,361  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-5] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:27:57,363  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-5] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/jpeg
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:27:57,364  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-5] Searched for transformer:
   source mimetype: application/msword
   target mimetype: image/png
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:28:03,477  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction2] 15.2       pdf  png  187K transformer.complex.PDF.Image<<Complex>>
2012-02-24 11:28:03,478  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction2] 15.2.1     pdf  png  187K transformer.PdfToImage<<Failover>>
2012-02-24 11:28:03,478  DEBUG [content.transform.TransformerDebug] [defaultAsyncAction2] 15.2.1.1   pdf  png  187K failover.transformer.PdfRenderer.PdfToImage
2012-02-24 11:28:06,025  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-13] Searched for transformer:
   source mimetype: application/msword
   target mimetype: application/x-shockwave-flash
   transformers: [ComplexContentTransformer[ average=0ms]]
2012-02-24 11:28:23,184  DEBUG [content.transform.TransformerDebug] [http-8080-13] 18         store://2012/2/24/11/26/c0935f32-f20e-4367-8f63-b6ef7d3c3424.bin
2012-02-24 11:28:23,184  DEBUG [content.transform.TransformerDebug] [http-8080-13] 18         doc  swf  94K ContentService.transform(…)
2012-02-24 11:28:23,185  DEBUG [content.transform.TransformerDebug] [http-8080-13] 18         **a) transformer.complex.OpenOffice.Pdf2swf<<Complex>> 0 ms
2012-02-24 11:28:23,186  DEBUG [content.transform.TransformerDebug] [http-8080-13] 18.1       doc  pdf  94K transformer.OpenOffice<<Proxy>>
2012-02-24 11:28:34,232  DEBUG [content.transform.TransformerDebug] [http-8080-13] 18.2       pdf  swf  187K transformer.Pdf2swf<<Proxy>>
2012-02-24 11:28:36,493  DEBUG [util.exec.RuntimeExec] [http-8080-13] Execution result:
   os:         Linux
   command:    [/usr/local/bin/pdf2swf, -T, 9, -s, zoom=72, -s, ppmsubpixels=1, -s, poly2bitmap=1, -s, bitmapfonts=1, /tmp/tomcat6-tmp/Alfresco/RuntimeExecutableContentTransformerWorker_source_1715175872721515589.pdf, -o, /tmp/tomcat6-tmp/Alfresco/RuntimeExecutableContentTransformerWorker_target_3195908353470743428.swf]
   succeeded:  true
   exit code:  0
   out:        NOTICE  processing PDF page 1 (595x842:0:0) (move:0:0)
NOTICE  processing PDF page 2 (595x842:0:0) (move:0:0)
NOTICE  processing PDF page 3 (595x842:0:0) (move:0:0)
NOTICE  processing PDF page 4 (595x842:0:0) (move:0:0)
NOTICE  processing PDF page 5
   err:
2012-02-24 11:28:37,099  DEBUG [content.transform.TransformerDebug] [http-8080-13] 18         Finished in 13917 ms

2012-02-24 11:28:39,661  DEBUG [content.transform.ContentTransformerRegistry] [http-8080-13] Searched for transformer:
   source mimetype: application/x-shockwave-flash
   target mimetype: text/plain
   transformers: []
2012-02-24 11:28:39,661  DEBUG [content.transform.TransformerDebug] [http-8080-13] 19         store://2012/2/24/11/28/61e3442c-b54b-4e50-9456-0e0a0feff1be.bin
2012-02-24 11:28:39,662  DEBUG [content.transform.TransformerDebug] [http-8080-13] 19         swf  txt  338K ADMLuceneIndexer NO transformers
2012-02-24 11:28:39,662  DEBUG [content.transform.TransformerDebug] [http-8080-13] 19         Finished in 2 ms Transformer NOT called

2012-02-24 11:28:39,969  DEBUG [content.transform.ContentTransformerRegistry] [DefaultScheduler_Worker-7] Searched for transformer:
   source mimetype: application/msword
   target mimetype: text/plain
   transformers: [TextMiningContentTransformer[ average=109ms]]
2012-02-24 11:28:39,971  DEBUG [content.transform.TransformerDebug] [DefaultScheduler_Worker-7] 20         store://2012/2/24/11/26/c0935f32-f20e-4367-8f63-b6ef7d3c3424.bin
2012-02-24 11:28:39,971  DEBUG [content.transform.TransformerDebug] [DefaultScheduler_Worker-7] 20         doc  txt  94K ADMLuceneIndexer
2012-02-24 11:28:39,972  DEBUG [content.transform.TransformerDebug] [DefaultScheduler_Worker-7] 20         **a) transformer.TextMining 109 ms
2012-02-24 11:28:40,191  DEBUG [content.transform.TransformerDebug] [DefaultScheduler_Worker-7] 20         Finished in 222 ms
Highlighted
Member II

Re: La prévisualisation des PDF se fait en PNG

En me relisant je m'aperçoit que je n'ai pas été très clair dans mon message précédent.

Le problème est toujours présent, la version installée avec l'installer dont je parle est sur une autre machine que cette VM.


Pour information, j'ai vérifié si le fichier PDF était correct, et voici le résultat lorsque je le donne à pdf2swf manuellement :

$ /usr/local/bin/pdf2swf test.pdf test.swf
NOTICE  processing PDF page 1 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 2 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 3 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 4 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 5 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 6 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 7 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 8 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 9 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 10 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 11 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 12 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 13 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 14 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 15 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 16 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 17 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 18 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 19 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 20 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 21 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 22 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 23 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 24 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 25 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 26 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 27 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 28 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 29 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 30 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 31 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 32 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 33 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 34 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 35 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 36 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 37 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 38 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 39 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 40 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 41 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 42 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 43 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 44 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 45 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 46 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 47 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 48 (841x595:0:0) (move:0:0)
NOTICE  processing PDF page 49 (841x595:0:0) (move:0:0)
NOTICE  Writing SWF file test.swf

Je soupçonne un problème de paramétrage, mais je n'arrive pas à trouver lequel…

Merci pour votre aide.
Highlighted
Active Member

Re: La prévisualisation des PDF se fait en PNG

Bonjour Alfer

Il y a un paramètre dans le fichier swf-transform.properties qui définit les paramètres passé à pdf2swf.
Certains paramètres provoquent un segfault de pdf2swf sur debian.

Tu peux redéfinir les paramètres passés à pdf2swf en ajoutant une ligne dans le alfresoc-global.properties par exemple :

swf.encoder.params=-s zoom=72
Highlighted
Member II

Re: La prévisualisation des PDF se fait en PNG

Bonjour Jérémie,

Merci pour cette indication.

Le problème ne vient malheuerusement pas de là.

Ce fichier de configuration est bien configuré, lorsque j'utilise les paramètres qui y sont à la ligne de commande de pdf2swf le fichier est bien transformé.

En fait les logs montent que pdf2swf n'est pas executé (du coup pas de crash au lancement du binaire) dans la chaine de transformation pdf => swf. Le composant de transformation n'est pas trouvé.
Highlighted
Member II

Re: La prévisualisation des PDF se fait en PNG

Bonjour,

Mon problème est toujours présent.

Je viens de faire une installation depuis un installer et sur une CentOS cette fois et la pré-visualisation se fait toujours via un PNG.

Le dénominateur commun est l'utilsiation d'une base MySQL au lieu de la base PostgreSQL embarqué par l'installeur.

J'ai créé la base de données à l'aide des commandes suivantes :

create database alfresco character set utf8 collate utf8_general_ci;
grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;
Highlighted
Member II

Re: La prévisualisation des PDF se fait en PNG

Bonjour,

Un out of memory semble peut être la cause de l'erreur, mais je ne suis pas arrivé à configurer la JVM pour corriger le "Stop reading corrupt stream".
Highlighted
Member II

Re: La prévisualisation des PDF se fait en PNG

J'ai pu résoudre le problème en augmentant à 2048 la variable suivante :

content.transformer.Pdf2swf.maxSourceSizeKBytes=2048


Cela fonctionne correctement maintenant.