cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco 3 and thumbnail generation

theorbix
Confirmed Champ
Confirmed Champ
Hello,

Correct me if I'm wrong, but I've noticed that in Alfresco 3.0 the generation of document thumbnails has been integrated in the core product and now document "previews" are accessible in the new Alfresco Share user interface.

Two questions about this feature:

1) How are thumbnails of Office (Word, Excel and PPT) and PDF documents generated? I guess that thumbnails of images (JPG, GIF, etc) are generated using the ImageMacick framework that is present in the Alfresco software since previous releases, but what software components are actually generating the thumbnails of Office and PDF documents? Is this done using OpenOffice? How?

2) Would it be possible to "retrofit" the thumbnail generation feature on Alfresco 2.2?

I've a customer who requests a document preview feature for Office and PDF documents, but they're going to use Alfresco 2.2 for some months, and there is no immediate plan of migrating to Alfresco 3 yet…
6 REPLIES 6

mikeh
Star Contributor
Star Contributor
ImageMagick can transform PDFs to images. There's a thumbnails Forge project that might be more relevant to V2.2 - as I suspect you're going to have quite a time of it trying to retrofit V3.0 code.

Mike

theorbix
Confirmed Champ
Confirmed Champ
Thanks Mike.

I didn't know that ImageMagick can transform PDFs to images, that's good.

But how does Alfresco 3 generate thumbnails from Office documents? When looking at the new Content Community (based on Alfresco Share), I've noticed that Alfresco 3 can generate thumbnails from Word or PPT files. See screenshot at:

http://www.flickr.com/photos/24369344@N03/3214639069/

Since my customer's main prerequisite is to be able to display previews of the first page of Word, Excel, PowerPoint and PDF files, I was wondering how to implement such a feature in Alfresco 2.2.

From what you wrote, to generate a thumbnail of the first page of a PDF file I could use the ImageMagick framework. But what about MS office stuff?

P.S. I was aware of the thumbnail project on the Forge since we used it for a recent project. But that project works only on images… not on Office documents

mikeh
Star Contributor
Star Contributor
But how does Alfresco 3 generate thumbnails from Office documents? When looking at the new Content Community (based on Alfresco Share), I've noticed that Alfresco 3 can generate thumbnails from Word or PPT files.
It's a multiple-step transformer: Office document -> PDF via OpenOffice.org -> Image via ImageMagick

Also, we can then go PDF -> SWF via pdf2swf to generate the preview used by the Flex component on the Details page.

Mike

theorbix
Confirmed Champ
Confirmed Champ
OK, I see…

So in Alfresco 3 there are some server-side components that use Open Office to "print to PDF" the first page of MS Office documents and then the PDF page generated is converted to a JPG thumbnail using ImageMagick.

Then the thumbnail is saved as a child-node association to the main document.

Did I guess right?

Do you believe that these pieces of code could be "back ported" to Alfresco 2.2? What are the class names, just to understand where to look in the Alfresco source code?

mikeh
Star Contributor
Star Contributor
Yes, Alfresco has had "transform to PDF" for a long time now, surely that's not news..?

Thumbnailing is in org.alfresco.repo.thumbnail.

Thanks,
Mike

jlabuelo
Champ on-the-rise
Champ on-the-rise
Hi guys

I have readed your comments about this post and thought that maybe you can give us a hand here. We are trying to run some configuration in Alfresco 3 and we have created a wizard that produces a new JPG node in the Alfresco repository. Just a question, we have tried to transform this JPG node in a new PDF node using just a simple transformation rule in the space, we get the pdf node, however when we try to download it to our Windows XP desktop, Adobe Reader is not able to open it.

Just need your confirmation, with the pdf transformation that Alfresco has, is it possible to transform a jpg node in  a new PDF node? if so, what do you think we are doing wrong as our new PDF file is not readable by Adobe Reader??, and if not, do you know any other way that we can use?
We have thougth about using the IText java library to create new pdf documents and import it to Alfresco to create a new war, but we would like to know if there is something simplier than that before?

Thanks a lot in advance