[SOLVED] Print documents in collabora

Hi Charles,

as object say I cannot print documents in collabora: when i open a document and click file -> print I see a download message but nothing is happening. I’m using latest collabora docker image.
I tried pydio online demo version and the print is ok.
Is there some pydio server configuration to do?

Regards

OS: Ubuntu 16.04
Pydio version: Pydio CE 7.0.4

Someone have any ideas?

Hi there,
i will look into it and see if there’s something that you should do.

Thanks a lot, I’ll wait impatiently.

Which release of collabora are you using ?
Which browser are you using ?
Printing a document should download a PDF.
It works flawlessly on firefox using loolwsd 3.1(but I’m not using docker image) on pydio 8.0.2.

I’m using collabora image tag latest ID f96ef2d9c0a3.
I usually use Chrome but I also tried firefox and Internet Explore whitout results.
I expect clicking on print start printing with system printers as pydio demo behavior; I could accept printing a PDF version of my document…but none of two options works: simply load for 1/2 seconds (I see loading…at bottom of page) and then no result.

Hi,
what you could do is look at Pydio’s logs to see what’s going on when you click.
You can either look at them through the database or you can get them in a text file by enabling this :

Last log is INFO message for file access, nothing logged related to print function or other…
I remember you that I’m using Pydio CE version 7.0.4.
I tried other action as “file -> download as…” but same behavior as print function.

As you are on ubuntu 16.04, could you try to install native collabora and not docker version ?
I had a lot of troubles with docker release, all passed away with native install.
Installing native version is rather easy.

Thanks for tip but I’m on production with docker and I cannot twist my environment.
Seeking for logs on collabora container all actions as print and save as…(any format) make this log entry

wsd-00027-0032 10:34:23.522502 [ client_ws_0015 ] ERR ClientRequestHandler::handleClientRequest: Syntax error: URI scheme must be followed by authority or path: https:| wsd/LOOLWSD.cpp:clock1230:

Some ideas?

It seems that’s something related to reverse proxy configuration.
Are you using apache for reverse proxy or nginx ?
About installing collabora in native mode it takes really very little and switching between the two environments (docker/native) is just matter of shutting down a service.

I have done a little script to perform the installation under ubuntu:

# Add Collabora repos
echo "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE /" >> /etc/apt/sources.list.d/collabora.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6CCEA47B2281732DF5D504D00C54D189F4BA284D
apt-get update

# Install the Collabora packages
apt-get -y install loolwsd code-brand collaboraoffice5.3-dict* collaboraofficebasis5.3*

# Copy dictionaries to paths where LOK recognizes them
mkdir -p /usr/share/hunspell
mkdir -p /usr/share/hyphen
mkdir -p /opt/lool/systemplate/usr/share/hyphen
for i in `find /opt/collaboraoffice5.3/share/extensions/ -name hyph*.dic`;do cp $i /opt/lool/systemplate/usr/share/hyphen;done
for i in `find /opt/collaboraoffice5.3/share/extensions/ -name hyph*.dic`;do cp $i /usr/share/hyphen;done
cp /opt/collaboraoffice5.3/share/extensions/dict-en/en_US.* /usr/share/hunspell
cp /opt/collaboraoffice5.3/share/extensions/dict-en/en_GB.* /usr/share/hunspell
cp /opt/collaboraoffice5.3/share/extensions/dict-it/it_IT.* /usr/share/hunspell
cp /opt/collaboraoffice5.3/share/extensions/dict-nl/nl_NL.* /usr/share/hunspell
cp /opt/collaboraoffice5.3/share/extensions/dict-pl/pl_PL.* /usr/share/hunspell
cp /opt/collaboraoffice5.3/share/extensions/dict-ru/ru_RU.* /usr/share/hunspell
cp /opt/collaboraoffice5.3/share/extensions/dict-pt-BR/pt_BR.* /usr/share/hunspell
cp /opt/collaboraoffice5.3/share/extensions/dict-pt-PT/pt_PT.* /usr/share/hunspell
cp /opt/collaboraoffice5.3/share/extensions/dict-fr/fr.dic /usr/share/hunspell/fr_FR.dic
cp /opt/collaboraoffice5.3/share/extensions/dict-fr/fr.aff /usr/share/hunspell/fr_FR.aff
cp /opt/collaboraoffice5.3/share/extensions/dict-es/es_ANY.dic /usr/share/hunspell/es_ES.dic
cp /opt/collaboraoffice5.3/share/extensions/dict-es/es_ANY.aff /usr/share/hunspell/es_ES.aff
cp /opt/collaboraoffice5.3/share/extensions/dict-de/de_AT_frami.dic /usr/share/hunspell/de_AT.dic
cp /opt/collaboraoffice5.3/share/extensions/dict-de/de_AT_frami.aff /usr/share/hunspell/de_AT.aff
cp /opt/collaboraoffice5.3/share/extensions/dict-de/de_CH_frami.dic /usr/share/hunspell/de_CH.dic
cp /opt/collaboraoffice5.3/share/extensions/dict-de/de_CH_frami.aff /usr/share/hunspell/de_CH.aff
cp /opt/collaboraoffice5.3/share/extensions/dict-de/de_DE_frami.dic /usr/share/hunspell/de_DE.dic
cp /opt/collaboraoffice5.3/share/extensions/dict-de/de_DE_frami.aff /usr/share/hunspell/de_DE.aff
apt-get -y remove --purge collaboraoffice5.3-dict*
#generate ssl certs for collabora (allow a long expiration time)
openssl genrsa -out /etc/loolwsd/root.key.pem 2048
openssl req -x509 -new -nodes -key /etc/loolwsd/root.key.pem -days 9131 -out /etc/loolwsd/ca-chain.cert.pem -subj "/C=IT/ST=Tuscany/L=Florence/O=My Company/CN=My Company"
openssl genrsa -out /etc/loolwsd/key.pem 2048 -key /etc/loolwsd/key.pem
openssl req -key /etc/loolwsd/key.pem -new -sha256 -out /etc/loolwsd/localhost.csr.pem -subj "/C=IT/ST=Tuscany/L=Florence/O=My Company/CN=My Company"
openssl x509 -req -in /etc/loolwsd/localhost.csr.pem -CA /etc/loolwsd/ca-chain.cert.pem -CAkey /etc/loolwsd/root.key.pem -CAcreateserial -out /etc/loolwsd/cert.pem -days 9131
chgrp lool /etc/loolwsd/key.pem
chmod g+r /etc/loolwsd/key.pem

Most of this script is “stolen” from docker installation :slight_smile:

after lool is installed i have set in apache the following part for reverse proxy config

    AllowEncodedSlashes NoDecode
    SSLProxyEngine On
    SSLProxyVerify None
    SSLProxyCheckPeerCN Off
    SSLProxyCheckPeerName Off

    # keep the host
    ProxyPreserveHost On
    ProxyPass /loleaflet https://127.0.0.1:9980/loleaflet retry=0
    ProxyPassReverse /loleaflet https://127.0.0.1:9980/loleaflet
    ProxyPass /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
    ProxyPassReverse /hosting/discovery https://127.0.0.1:9980/hosting/discovery
    ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/$1/ws nocanon
    ProxyPass /lool/adminws wss://127.0.0.1:9980/lool/adminws
    ProxyPass /lool https://127.0.0.1:9980/lool
    ProxyPassReverse /lool https://127.0.0.1:9980/lool

obviously I have enabled mod_proxy, mod_proxy_http, mod_proxy_wstunnel and mod_ssl in apache

I have alla parameters as you except:

AllowEncodedSlashes On

Can be that paramenter?

It could be because as reported in Apache Docs:

AllowEncodedSlashes Determines whether encoded path separators in URLs are allowed to be passedthrough
With the value NoDecode, such URLs are accepted, but encoded slashes are not decoded but left in their encoded state.

If Collabora expect path passed thru as encoded it could break collabora functionality. In the setup guide of collabora is specified to set that parameter as NoDecode. (have a look to: Collabora Online Development Edition (CODE) - Collabora Office and Collabora Online )

PS: Apache guide also specify that if encoded slashes are needed in path info, use of NoDecode is strongly recommended as a security measure. Allowing slashes to be decoded could potentially allow unsafe paths.

Exactly!

this is the right solution.
I changed apache virtualhost paramenter and print/save as function is ok.

Thanks a lot romoloman