Preview docx

278 views
Skip to first unread message

Jonathan Tarro

unread,
Feb 16, 2016, 4:46:14 AM2/16/16
to ResourceSpace
I have my Resourcespace server running on Ubuntu 14.04 LTS.  I found that my system was not previewing any docx, xlsx and pptx so I followed the documentation for the open office integration located here: http://wiki.resourcespace.org/index.php/OpenOffice_Integration.

To this point I have verified that unoconv listener is currently running but when I search for the file types (docx, pptx, xlsx) I still get the icon instead of a preview.  Am I supposed to run a config file not included or am I missing something else?  Thanks for the help.


Allison M Stec

unread,
Feb 16, 2016, 8:26:00 AM2/16/16
to resour...@googlegroups.com
You'll need to recreate previews for these files.


On 02/15/2016 02:19 PM, Jonathan Tarro wrote:
I have my Resourcespace server running on Ubuntu 14.04 LTS.  I found that my system was not previewing any docx, xlsx and pptx so I followed the documentation for the open office integration located here: http://wiki.resourcespace.org/index.php/OpenOffice_Integration.

To this point I have verified that unoconv listener is currently running but when I search for the file types (docx, pptx, xlsx) I still get the icon instead of a preview.  Am I supposed to run a config file not included or am I missing something else?  Thanks for the help.


--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
--
ResourceSpace Developer
Reseller of Colorhythm's Prismpoint Portal DAM

Ask me about ResourceSpace AWS Plugins

Jonathan Tarro

unread,
Feb 16, 2016, 11:07:03 AM2/16/16
to ResourceSpace
OK, so it looks like I have boiled the problem down a bit more and have found that it is related in some way to static sync.  The documents that I am running static sync on (from a mapped network drive & staticsync_ingest=false) all do not give me a preview.

Is it not a function of the system to give a preview with static sync documents?  I have searched for that but the only issue posted was back from 2012 and no none responded.  Also, I have been searching this group and found that some are posting snips from error logs relating to unoconv, can someone point me to where that errorlog is located?  Thanks again.

Jonathan Tarro

unread,
Feb 17, 2016, 6:12:35 AM2/17/16
to ResourceSpace
How would one recreate previews of these?  I have the listener setup as the document states.

Allison M Stec

unread,
Feb 17, 2016, 7:19:16 AM2/17/16
to resour...@googlegroups.com
There are a few ways to recreate previews...

  1. You can edit a resource and select "Recreate Previews" from the edit preview images dropdown.
  2. You can create a collection and use the collection action "Edit collection previews".
  3. You can use the script in <root>/pages/tools/update_previews (open the script before using to understand what parameters can be passed).

Jonathan Tarro

unread,
Feb 17, 2016, 12:29:37 PM2/17/16
to ResourceSpace
The docs and docx turned out to be a permissions issue with my mounted windows share and giving explicit permissions while mounting.  I am still unable to get xls and xlsx previews though.  When I attempt to recreate the preview in edit resource there isn't an error it just doesn't get created.  Any ideas?

In case it helps anyone out (although someone may have already posted it) to fix my permissions issue in my fstab file (/etc/fstab) it was mandatory that I have file_mode=0777,dir_mode=0777 in my mount line.

For example this worked for me (note that I am using a credentials file that is a flat file with share authentication (username and password) in my home directory that I gave 600 (owner read/write):
  • //<server>/<share> /media/<localdir> cifs credentials=/home/administrator/.smbcredentials,iocharset=utf8,sec=ntlm,file_mode=0777,dir_mode=0777 0 0
It had to be 0777, so other had to have admin level access as 0775 didn't work.

Allison M Stec

unread,
Feb 17, 2016, 1:12:25 PM2/17/16
to resour...@googlegroups.com
The xlsx extension isn't part of $unoconv_extensions by default, so you'd have to add it in.

Are you looking for errors in the debug log at all? If not, try to recreate previews for an excel file and see what the log gives you.

Jonathan Tarro

unread,
Feb 17, 2016, 2:45:17 PM2/17/16
to ResourceSpace
In my config.php I have: $unoconv_extensions=array("doc","docx","odt","odp","html","rtf","txt","ppt","pptx","sxw","sdw","html","psw","rtf","sdw","pdb","bib","txt","ltx","sdd","sda","odg","sdc","xlsx","xls");

Can you tell me what log you are referring to?

Allison M Stec

unread,
Feb 17, 2016, 4:01:42 PM2/17/16
to resour...@googlegroups.com
RS has it's own debug log which is turned off by default ($debug_log). This will give you an idea of what's happening behind the scenes.

Jonathan Tarro

unread,
Feb 18, 2016, 11:47:13 AM2/18/16
to ResourceSpace
Allison, thanks for sticking with me on this.  I believe the snip I am pasting below is where my problem is.  It looks like it is pointing to a permissions issue but I have already chown'd 777 my filestore (/var/www/resourcespace/filestore).  Have you seen that before?

2016-02-18 16:25:27 Starting preview preprocessing. File extension is xlsx.
2016-02-18 16:25:27 CLI command: /usr/bin/unoconv --format=pdf '/var/www/resourcespace/include/../filestore/1/0/8_ea7f3d8bea30fa3/108_aa52c0f77e1c27d.xlsx'
2016-02-18 16:25:27 CLI output: 
2016-02-18 16:25:27 CLI errors: mkstemp("/var/www/.execoooDXq9Gm") failed: Permission denied
mkstemp("/var/www/.execooojYyTs1") failed: Permission denied
mkstemp("/var/www/.execooo9ajOeG") failed: Permission denied
mkstemp("/var/www/.execoooThXL0k") failed: Permission denied
mkstemp("/var/www/.execooo5ntMMZ") failed: Permission denied
mkstemp("/var/www/.execooon24WyE") failed: Permission denied
mkstemp("/var/www/.execoooHYxalj") failed: Permission denied
mkstemp("/var/www/.execooonwry7X") failed: Permission denied
mkstemp("/var/www/.execoooz65YTC") failed: Permission denied
mkstemp("/var/www/.execooo5kyJGh") failed: Permission denied
mkstemp("/var/www/.execooolKj5tW") failed: Permission denied
mkstemp("/var/www/.execooojj1QoB") failed: Permission denied
mkstemp("/var/www/.execooopivDjg") failed: Permission denied
mkstemp("/var/www/.execooovABqeV") failed: Permission denied
mkstemp("/var/www/.execooo1Xie9z") failed: Permission denied
mkstemp("/var/www/.execooo5lv23e") failed: Permission denied
mkstemp("/var/www/.execooozlyb7T") failed: Permission denied
mkstemp("/var/www/.execooop6Boaz") failed: Permission denied
mkstemp("/var/www/.execooofB3rke") failed: Permission denied
unoconv: UnoException during export phase:
Unable to store document to file:///var/www/resourcespace/filestore/1/0/8_ea7f3d8bea30fa3/108_aa52c0f77e1c27d.pdf (ErrCode 3088)

Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0, Value = (any){ (com.sun.star.uno.XInterface)0x11a3ec8{, supportedInterfaces={com.sun.star.io.XOutputStream,com.sun.star.lang.XTypeProvider}} }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"FilterName", Handle = (long)0x0, Value = (any){ (string)"calc_pdf_Export" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE })
2016-02-18 16:25:27 CLI command: unzip -p '/var/www/resourcespace/include/../filestore/1/0/8_ea7f3d8bea30fa3/108_aa52c0f77e1c27d.xlsx' "docProps/thumbnail.jpeg" > /var/www/resourcespace/include/../filestore/1/0/8_ea7f3d8bea30fa3/108_aa52c0f77e1c27d.jpg
2016-02-18 16:25:27 CLI output: 
2016-02-18 16:25:27 CLI errors: caution: filename not matched:  docProps/thumbnail.jpeg
2016-02-18 16:25:27 FFMPEG-VIDEO: ####################################################################
2016-02-18 16:25:27 FFMPEG-VIDEO: Start trying FFMPeg for video files -- resource ID 108
2016-02-18 16:25:27 create_previews(ref=108,thumbonly=,extension=jpg,previewonly=,previewbased=,alternative=-1,ingested=,checksum_required=1)
2016-02-18 16:25:27 SQL: select file_extension value from resource where ref=108
2016-02-18 16:25:27 SQL: update resource set preview_tweaks = '0|1' where ref = '108'
2016-02-18 16:25:27 File source is /var/www/resourcespace/include/../filestore/1/0/8_ea7f3d8bea30fa3/108_aa52c0f77e1c27d.jpg
2016-02-18 16:25:27 create_previews_using_im(ref=108,thumbonly=,extension=jpg,previewonly=,previewbased=,alternative=-1,ingested=)
2016-02-18 16:25:27 CLI command: '/usr/bin/identify' -format %wx%h '/var/www/resourcespace/include/../filestore/1/0/8_ea7f3d8bea30fa3/108_aa52c0f77e1c27d.jpg'[0]
2016-02-18 16:25:27 CLI output: 
2016-02-18 16:25:27 CLI errors: identify: Empty input file `/var/www/resourcespace/include/../filestore/1/0/8_ea7f3d8bea30fa3/108_aa52c0f77e1c27d.jpg' @ error/jpeg.c/JPEGErrorHandler/316.

Allison M Stec

unread,
Feb 18, 2016, 12:29:12 PM2/18/16
to resour...@googlegroups.com
I don't think your permissions issue are with the filestore, but with "/var/www". Since temp files can't be made there anything that happens after fails too.

Some things to consider:

What happens when you run the unoconv command from the cli ("/usr/bin/unoconv --format=pdf '/var/www/resourcespace/include/../filestore/1/0/8_ea7f3d8bea30fa3/108_aa52c0f77e1c27d.xlsx'")? is the pdf created or do you get errors?

Check for the presence of suid interactions. Without going into much detail, these interactions will actually use the permissions of the file/directory’s owner during execution. You'd see an "s" in the permission info when you ran "ls".

Jonathan Tarro

unread,
Feb 22, 2016, 9:07:00 AM2/22/16
to ResourceSpace
When I run the command from the CLI I get the following (pasted below).  I don't think that it is a permissions issue with /var/www as (for testing purposes) I it chown'd 777 but it still won't create.  I am actually starting to think that it may be a problem with the version of unoconv (0.6-6) or libreoffice (4.2.8-0ubuntu4 amd64) as I have seen some posts elsewhere that have talked about xlsx conversion with unoconv issues and those issues being sent as a bug fix.  I am not sure of this though.  I have tried uninstalling libreoffice and installing openoffice but I didn't have any luck with getting that to work with any of the document previews.  Any more ideas?  Again, thanks for the help!

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
unoconv: UnoException during export phase:
Unable to store document to file:///var/www/resourcespace/filestore/1/0/8_ea7f3d8bea30fa3/108_aa52c0f77e1c27d.pdf (ErrCode 3088)

Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true }, State =                          (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0,                          Value = (any){ (com.sun.star.uno.XInterface)0x2ca8108{, supportedInterfaces={com.sun.star.io.XOutputStream,com.sun.star.lang.XTypeProvide                         r}} }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"FilterName", Handle                          = (long)0x0, Value = (any){ (string)"calc_pdf_Export" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE })

Allison M Stec

unread,
Feb 22, 2016, 9:18:29 AM2/22/16
to resour...@googlegroups.com
You could try upgrading LibreOffice to something more current.

You could also try a manual conversion after adjusting the output
location to some location where you know the cli user has access to
(such as a home directory).

It seems like you dismissed my permissions information, but you should
really look into it. if suid settings are present, a simple chmod 777
will not work as expected!

On 02/22/2016 09:07 AM, Jonathan Tarro wrote:
> ErrCode 3088

Jonathan Tarro

unread,
Feb 22, 2016, 2:05:48 PM2/22/16
to ResourceSpace
I certainly did not mean to dismiss any of your suggestion.  To further test a permissions issue I copied the xlsx file into my home directory and ran the unoconv but got the same error.  

I was able to confirm that the issue is actually an incompatibility problem (specifically a python and pyuno incompatibility as discussed here - https://github.com/dagwieers/unoconv).  The way I got this working is to remove the current unoconv (0.6-6) and install the latest (0.7) into /usr/bin.  All is working now.

By the way in running through this I came across a lot of things in the ubuntu documentation that probably worked in an older version but does not in server 14.04 which is the current LTS.  I wrote a document for my own use but if you all are interested I can share it (it is on my google drive) with someone so they can update the wiki.
Reply all
Reply to author
Forward
0 new messages