cancel
Showing results for 
Search instead for 
Did you mean: 

Share previever document layout sometimes broken?

zladuric
Champ on-the-rise
Champ on-the-rise
Hello,

I wonder if something can be done about the 4.2c Share content previewer. It works with some of my PDFs and Office documents, but on others it is broken.

In example, if I load this https://www.dropbox.com/s/r17c5tj2tooim82/What%20is%20Magic%20Briefcase.pdf file, my previewer looks broken, like this: https://www.dropbox.com/s/3ac4ei0g8nnkh6o/broken_preview.png. The thumbnails in document library look fine, but the preview on document-details page is broken.

I believe I it may be connected issues with PDF files exported from Microsoft Office or Libre Office. I'm using LibreOffice 3.5 on the server.

Can anybody say if they've had similar issues or point me in the right direction?
13 REPLIES 13

lukasz_turakiew
Champ in-the-making
Champ in-the-making
Hi Zlatko,

Could you please insert a valid link to "What is Magic Briefcase-4.pdf" file? It seems you inserted two links to screenshot of document-details page.

Regards,
Lukasz Turakiewicz

zladuric
Champ on-the-rise
Champ on-the-rise
Hi,

Thanks for the reply, I updated the post with the correct link.

lukasz_turakiew
Champ in-the-making
Champ in-the-making
The preview looks good in my environment (Alfresco 4.2.c with default settings, swftools 0.9.1, Win 7, Firefox 17.01 or Chrome or IE9, Flash 11.5.502.135). To show the preview Alfresco converts pdf to swf using pdf2swf tool from swftools package -  so in this case (pdf file) LibreOffice is not used in conversion process. Maybe you are using Linux version of Alfresco?

Regards,
Lukasz Turakiewicz

zladuric
Champ on-the-rise
Champ on-the-rise
Yep, I'm using linux version. I tried converting directly with pdf2swf to see the result - I didn't think of that until you mentioned it. There seems to be some error:

zlatko@server ~ # pdf2swf What\ is\ Magic\ Briefcase.pdf
NOTICE  Output filename not given. Writing to What is Magic Briefcase.swf
Error: May not be a PDF file (continuing anyway)
Error: PDF file is damaged - attempting to reconstruct xref table…
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table
ERROR   Couldn't open What is Magic Briefcase.pdf
zlatko@server ~ #

I even compiled swftools 0.9.1, the same result. It appears the problem is there?

lukasz_turakiew
Champ in-the-making
Champ in-the-making
Alfresco adds additional conversion parameters to pdf2swf (there are in swf-transform.properties) so you should also add them from command line - you can also try other versions of pdf2swf.
You can also check the generated (generated by Alfresco during creating webpreview thumbnail) swf file and open it directly in the browser - open Alfresco Node Browser, find your document, open webpreview child and open its content (mimetype=application/x-shockwave-flash) - is it the same as the one in Share webpreviewer?

Regards,
Lukasz Turakiewicz

zladuric
Champ on-the-rise
Champ on-the-rise
The webpreview file is good - I can open it without problems: https://www.dropbox.com/s/d5fe3a61k16gwom/file.swf
. But the layout in Alfresco is still broken.

Do you have any pointers where I could look?

Oh, and just for the record, I really really appreciate your involvement and help Smiley Happy

lukasz_turakiew
Champ in-the-making
Champ in-the-making
I used your swf file as a content (cm:content) for the webpreview thumbnail (I switched the original swf) and I also got the broken preview in Share previewer - so it seems the Linux version of pdf2swf tool generates "invalid" swf file. I think you can check other versions of swftools package to find which of them is able to generate a valid swf file. Did you try 0.9.2 and 0.9.1 versions?

Regards,
Lukasz Turakiewicz

zladuric
Champ on-the-rise
Champ on-the-rise
Yes, I have tested both versions. I'll see if I have another version of pdf2swf available.

mnemonic
Champ on-the-rise
Champ on-the-rise
Did you solve this? I'm having the same problem here with docx files. First preview is ok, but when the preview is regenerated p.e. after online edit, the preview gets distorted.

Regards,

Jan