RE: Liferay 7 file Preview content wrong displaying

srini vasulu, modified 5 Years ago. Regular Member Posts: 139 Join Date: 2/22/11 Recent Posts
Hi All,I am using liferay 7  GA5 and uploading the files in document library nearly 3 MB files and above but the preview of files and thumbnails generating content is wrong and not exactly as file.here i am using  java-1.8.0-openjdk-1.8.0.222-2.i am facing issue in windows and Ubuntu.
i set the image magic and ghost-scripts like below.
imagemagick.enabled=true
  imagemagick.global.search.path[windows]=C:\\Program Files\\gs\\gs9.19\\bin;C:\\Program Files\\ImageMagick-7.0.2-Q16imagemagick.global.search.path[unix]=/usr/bin:/usr/share/fonts/type1/gsfonts
as per properties file from src  imagemagick.global.search.path[unix]=/usr/local/bin:/usr/local/share/ghostscript/fonts:/usr/local/share/fonts/urw-fonts --- here i did not find the urw-fonts do we need to install separatly urw-fonts?
thumbnail
Andrew Jardine, modified 5 Years ago. Liferay Legend Posts: 2416 Join Date: 12/22/10 Recent Posts
Hi Srini --

I think you have two questions here. With the issue regarding the font, I did a quick google search and found a few (other) forum threads where people are reporting the same issue. This one,  seems to have a solution. I know it is for centos, but you -should be able to install an RPM in ubuntu as well.

For your OTHER question, the one referred to in the subject, I did come across something like this recently, though it was for an older version of Liferay -- 6.2 in fact. Couple of questions for you --

1. Are any of the files generating previews? for example, JPGs are fine, but PDFs never seem to work 
2. Are you working in a clustered environment? ... I have seen cases where the preview shows up on one server, but not the other and it is related to the environment configuration (eg. each node configured with a different document store)
3. On the subject of document store - can you share with us which Document storage type you have configured?

There are also a whole pile of properties that are associated with the preview generation. Some of them are just to control the output of course, but others are used to toggle it on and off -- and there are dependencies on other properties as well. Here are the default values, but I would suggest using the control panel to see what values are in place in your runtime


#
# Set the maximum file size for preview and thumbnail generation. Files
# larger than the value specified in this property will not result in the
# execution of a processor that generates a preview. A value of -1 indicates
# that all files will be processed. A value of 0 indicates that no files
# will be processed. The default maximum size is 100 megabytes.
#
dl.file.entry.previewable.processor.max.size=104857600


#
# Set the values related to preview and thumbnail generation for document
# library files. The classes enabled under "dl.file.entry.processors" will
# utilize these parameters to generate the necessary files.
#
# Some parameters are applied universally across all processors (e.g.,
# dl.file.entry.thumbnail.max.height) while others are specific to certain
# types of generation, as specified (e.g.,
# dl.file.entry.preview.document.depth).
#
# If the property "dl.file.entry.preview.video.height" or the property
# "dl.file.entry.preview.video.width" is set to 0, then respective height
# and width of the video file will be used.
#
# See the properties "imagemagick.enabled", "openoffice.server.enabled", and
# "xuggler.enabled".
#
dl.file.entry.preview.enabled=true
dl.file.entry.preview.document.depth=8
dl.file.entry.preview.document.dpi=300
dl.file.entry.preview.document.max.height=0
dl.file.entry.preview.document.max.width=1000
dl.file.entry.preview.video.height=360
dl.file.entry.preview.video.width=640


Lastly, though I am not sure it would help, there is a 7.0 GA6 -- have you tried possibly upgrading to the latest version to see if there is a fix that solves your problem?
srini vasulu, modified 5 Years ago. Regular Member Posts: 139 Join Date: 2/22/11 Recent Posts
Andrew Jardine:

Hi Srini --

I think you have two questions here. With the issue regarding the font, I did a quick google search and found a few (other) forum threads where people are reporting the same issue. This one,  seems to have a solution. I know it is for centos, but you -should be able to install an RPM in ubuntu as well.

For your OTHER question, the one referred to in the subject, I did come across something like this recently, though it was for an older version of Liferay -- 6.2 in fact. Couple of questions for you --

1. Are any of the files generating previews? for example, JPGs are fine, but PDFs never seem to work 
2. Are you working in a clustered environment? ... I have seen cases where the preview shows up on one server, but not the other and it is related to the environment configuration (eg. each node configured with a different document store)
3. On the subject of document store - can you share with us which Document storage type you have configured?

There are also a whole pile of properties that are associated with the preview generation. Some of them are just to control the output of course, but others are used to toggle it on and off -- and there are dependencies on other properties as well. Here are the default values, but I would suggest using the control panel to see what values are in place in your runtime


#
# Set the maximum file size for preview and thumbnail generation. Files
# larger than the value specified in this property will not result in the
# execution of a processor that generates a preview. A value of -1 indicates
# that all files will be processed. A value of 0 indicates that no files
# will be processed. The default maximum size is 100 megabytes.
#
dl.file.entry.previewable.processor.max.size=104857600


#
# Set the values related to preview and thumbnail generation for document
# library files. The classes enabled under "dl.file.entry.processors" will
# utilize these parameters to generate the necessary files.
#
# Some parameters are applied universally across all processors (e.g.,
# dl.file.entry.thumbnail.max.height) while others are specific to certain
# types of generation, as specified (e.g.,
# dl.file.entry.preview.document.depth).
#
# If the property "dl.file.entry.preview.video.height" or the property
# "dl.file.entry.preview.video.width" is set to 0, then respective height
# and width of the video file will be used.
#
# See the properties "imagemagick.enabled", "openoffice.server.enabled", and
# "xuggler.enabled".
#
dl.file.entry.preview.enabled=true
dl.file.entry.preview.document.depth=8
dl.file.entry.preview.document.dpi=300
dl.file.entry.preview.document.max.height=0
dl.file.entry.preview.document.max.width=1000
dl.file.entry.preview.video.height=360
dl.file.entry.preview.video.width=640


Lastly, though I am not sure it would help, there is a 7.0 GA6 -- have you tried possibly upgrading to the latest version to see if there is a fix that solves your problem?



Hi Andrew,
Thanks for your Quick reply.most of the properties i keep it same as default except below property
dl.file.entry.previewable.processor.max.size=-1 -- here i given -1 because all size files will preview.
dl.file.entry.processors i did not tuch any thing because i am uploading .docx files and by default it will support.
7.0 GA 6 i did not tried it still but will try it.i am using here open-jdk it will any impact on converting to preview file?
thumbnail
Andrew Jardine, modified 5 Years ago. Liferay Legend Posts: 2416 Join Date: 12/22/10 Recent Posts
Hi Srini,

Ok,  good to know that you're using the stock settings.  I'm still wondering about the different file types though. You mentioned docx files, but are you seeing this behaviour for ALL files? or just certain file types?
srini vasulu, modified 5 Years ago. Regular Member Posts: 139 Join Date: 2/22/11 Recent Posts
Andrew Jardine:

Hi Srini,

Ok,  good to know that you're using the stock settings.  I'm still wondering about the different file types though. You mentioned docx files, but are you seeing this behaviour for ALL files? or just certain file types?


Hi Andrew,
I am seeing only for .docx files. in this files also only heading with numbers place i am facing issue example below here 2.1 place some time it will get different number and some times that number won't display. in windows i am not getting numbers but in ubuntu box i am getting 1.1 like that. tested in GA6 also same issue.
Even i am tested with 7.2.0-ga1​​​​​​​ version same issue i am facing.

​​​​​​​