Combination View Flat View Tree View
Threads [ Previous | Next ]
Cameron McBride
Document Previews (ImageMagick) 6.1 EE GA1?
February 23, 2012 7:53 AM
Answer

Cameron McBride

Rank: Expert

Posts: 278

Join Date: February 8, 2011

Recent Posts

In Liferay 6.1 CE to get document previews you enable the Open Office integration. In 6.1 EE GA1 they have changed this to ImageMagick.

I have checked the Enable ImageMagick box and entered the path to it: C:\Program Files\ImageMagick-6.7.5-Q16
Next I publish a word document and a spreadsheet that both worked in 6.1 CE. After 20 minutes I still just get the message "Generating preview will take a few minutes.".

I checked the log file in <liferay>\logs and in <liferay>\<tomcat>\logs and did not see anything good or bad in there. I also tried restarting the portal and publishing a 3rd document.

Any tips on how to get document previews going would be awesome!
Mika Koivisto
RE: Document Previews (ImageMagick) 6.1 EE GA1?
February 23, 2012 1:36 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1499

Join Date: August 7, 2006

Recent Posts

I think all non pdf or image documents require also OpenOffice to be configured and running.
Cameron McBride
RE: Document Previews (ImageMagick) 6.1 EE GA1?
February 24, 2012 4:58 AM
Answer

Cameron McBride

Rank: Expert

Posts: 278

Join Date: February 8, 2011

Recent Posts

I do have open office up and running and that option enabled in Liferay. When I go to the document (which now has no preview) on the right I have the conversion options, like turning a .doc to a .pdf.
Mika Koivisto
RE: Document Previews (ImageMagick) 6.1 EE GA1?
February 28, 2012 9:10 AM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1499

Join Date: August 7, 2006

Recent Posts

Hmm. Interesting. Have you tried that the conversion to pdf works?
Cameron McBride
RE: Document Previews (ImageMagick) 6.1 EE GA1?
February 28, 2012 1:08 PM
Answer

Cameron McBride

Rank: Expert

Posts: 278

Join Date: February 8, 2011

Recent Posts

The document conversion works great or at least the same as it worked before.
Cameron McBride
RE: Document Previews (ImageMagick) 6.1 EE GA1?
March 6, 2012 1:20 PM
Answer

Cameron McBride

Rank: Expert

Posts: 278

Join Date: February 8, 2011

Recent Posts

Anything else I can try to get this working so I can demo it off to some folks? We are currently running a trial of EE but hopefully we get our real EE license soon. I can make a ticket at that point I suppose.
Mika Koivisto
RE: Document Previews (ImageMagick) 6.1 EE GA1?
March 7, 2012 11:21 AM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1499

Join Date: August 7, 2006

Recent Posts

Well if ImageMagick does not work on your system you can run without it too. Then it'll use PDFBox which has worked very well for me. Once I have some time I'll install ImageMagick on my Mac to see how it works. Did you also install Ghostscript? I think that is also required for the imagemagick conversion to work.
Cameron McBride
RE: Document Previews (ImageMagick) 6.1 EE GA1?
March 7, 2012 11:23 AM
Answer

Cameron McBride

Rank: Expert

Posts: 278

Join Date: February 8, 2011

Recent Posts

I did not install anything except for ImageMagic for Windows and configured the path in Liferay. I do not see a place in Liferay to tell it to use this PDFBox instead.
Mika Koivisto
RE: Document Previews (ImageMagick) 6.1 EE GA1?
March 7, 2012 2:45 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1499

Join Date: August 7, 2006

Recent Posts

Just set imagemagick.enabled=false in your portal-ext.properties. This is the default value.
Mika Koivisto
RE: Document Previews (ImageMagick) 6.1 EE GA1?
March 7, 2012 2:48 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1499

Join Date: August 7, 2006

Recent Posts

Just noticed we have some troubleshooting tips for preview generation in Preview Generation Wiki article
Cameron McBride
RE: Document Previews (ImageMagick) 6.1 EE GA1?
March 8, 2012 8:49 AM
Answer

Cameron McBride

Rank: Expert

Posts: 278

Join Date: February 8, 2011

Recent Posts

That article helped and I've made some progress. First I have turned off ImageMagic since it doesn't work. The troubleshooting is really for Linux/Mac and not Windows. No errors come out so I am unsure how to resolve it. Turning off ImageMagic reverts back to PDFBox so previews are working again.

PDF is previewed by PDFBox
Word/Excel/Other is converted to PDF and previewed by PDFBox (I assume this is what's happening)
The fonts are all unreadable and garbage, I guess that is why they say to use the non-working ImageMagic

Documents published before this was turned on look like they lose out on both Previews and Conversion.

I also installed and turned on Xuggler. I get tons of errors in the logs so that gives me something to work on.
David Coulbeau
RE: Document Previews (ImageMagick) 6.1 EE GA1?
April 2, 2012 3:17 AM
Answer

David Coulbeau

Rank: New Member

Posts: 8

Join Date: October 26, 2007

Recent Posts

Hi,

Installing Ghostscript on the server solves the problem for me.

Try to open a pdf from "image magick display" on you server, if you have an error (postcript delegate failed), then ghostscript is not installed.

install it and retry the conversion.

Now i can convert all pdf faster with good quality.

regards

david
Milan Palian
RE: Document Previews (ImageMagick) 6.1 EE GA1?
July 6, 2012 12:15 PM
Answer

Milan Palian

Rank: Junior Member

Posts: 43

Join Date: December 10, 2009

Recent Posts

I thought it did not work on CE 6.1 GA1, but it does.

I am using opensuse 12.1 with ImageMagick and Ghostscript and it was throwing a file not found on "convert", but it was just a matter of setting up the paths correctly to the ImageMagick executables and fonts in the management console. I thought they were correct, but they were not.
Milan Palian
RE: Document Previews (ImageMagick) 6.1 EE GA1?
July 7, 2012 12:51 AM
Answer

Milan Palian

Rank: Junior Member

Posts: 43

Join Date: December 10, 2009

Recent Posts

Milan Palian:
I thought it did not work on CE 6.1 GA1, but it does.

It turned out that preview works better when using ImageMagick than just PDFBox, but I could not download some of the pdfs, it starts the download and hangs. So I had to go back to PDFBox, which at least works. Incidentally, I had a lot of problems with PDFs not being displayed, still do. It seems that Liferay cannot handle everything that tools like Nitro Box can do to a file and when you get files from users, you have to control over it.
David PROVOST
RE: Document Previews (ImageMagick) 6.1 EE GA1?
October 15, 2012 11:38 PM
Answer

David PROVOST

Rank: New Member

Posts: 1

Join Date: November 16, 2011

Recent Posts

Milan Palian:
but I could not download some of the pdfs, it starts the download and hangs.

I think this is not related to preview / imagemagik. We experienced some problems with pdf browser plugins like Adobe reader 9.5. The plugin can display a pdf while still downloading it. This is performed through partial download requests, which seem not to be correctly managed by Liferay 6.1. We have an open ticket about this issue.
Juan Gonzalez
RE: Document Previews (ImageMagick) 6.1 EE GA1?
October 16, 2012 12:44 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1855

Join Date: October 28, 2008

Recent Posts

Hi Milan,

As other member said, this has nothing to do with PDF preview. There is a known issue in 6.1.1 GA (probably 6.1.0 too) when trying to see inline PDF using IE and SSL.

And yes, ImageMagick does better PDF preview than PDFBox.