Forums de discussion

Document Preview within Document Library Metadata

thumbnail
Dustin V Kintanar, modifié il y a 8 années.

Document Preview within Document Library Metadata

New Member Publications: 5 Date d'inscription: 10/04/08 Publications récentes
Hello All,

We are working on a project that requires previewing of PDF (and potentially other) documents in a similar manner as is seen within the Document Library Metadata screen with previews turned on (list of thumbnails, larger image, etc...), but with specific formatting requirements. I am planning on looking into the source, but thought it would be worth reaching out to the community first to maybe short circuit some R&D.

Is the document preview included within the OOTB LIferay based on an open source or third party tool that we could leverage? If not, are the images generated for the preview accessible through one of the Liferay service util classes (I believe I only noticed thumbnails)? The thought being that we could perhaps hook into one of the many JS image galleries that are available.

I did notice some document previewers within the Marketplace, but none seemed to quite fit our requirements.

Thanks,
Dustin
thumbnail
Alexey Kakunin, modifié il y a 8 années.

RE: Document Preview within Document Library Metadata

Liferay Master Publications: 621 Date d'inscription: 07/07/08 Publications récentes
Hi Dustin.

Internally Liferay using pdfbox (https://pdfbox.apache.org/) or calling external ImageMagic program (need additional configuration in control panel - but produces better quality of images) for generating previews for PDF files.

Previews is accessible via com.liferay.portlet.documentlibrary.util.DLUtil.getPreviewURL method (look into it's sources for more details).

Best way to understant how to get previews o files - look into Liferay sources - for example JSP page displayed previews: view_file_entry.jsp

Hope these gives you idea there to look for more info.
====
Alexey Kakunin
EmDev Limited - Liferay Experts in Russia
thumbnail
Jitendra Rajput, modifié il y a 8 années.

RE: Document Preview within Document Library Metadata

Liferay Master Publications: 875 Date d'inscription: 07/01/11 Publications récentes
Preview generation can be enabled in Document and Media Portlet by configuring ImageMagick.

You can follow this wiki to know how to configure ImageMagick in Liferay.
thumbnail
Dustin V Kintanar, modifié il y a 8 années.

RE: Document Preview within Document Library Metadata

New Member Publications: 5 Date d'inscription: 10/04/08 Publications récentes
Thank you for the replies.

Sorry for the confusion Jitendra, but this is not about the generation of the preview images, but about the viewer used to render the preview images.

Alexay, I was going to take a look at the getPreviewURL method, but was confused because it only returns a single string. What if there are multiple images? Or is this actually returning a URL to the entire viewer itself. Thank you for the lead - I'll take a look at that JSP once the weekend is over.

Thanks,
Dustin
thumbnail
Patrick Wolf, modifié il y a 8 années.

RE: Document Preview within Document Library Metadata

Regular Member Publications: 127 Date d'inscription: 15/09/10 Publications récentes
Hello,
This blog post may give some insight.