wiki:DocRenderPlugin

Version 6 (modified by bsavelev, 3 years ago) (diff)

--

DocRenderPlugin -- preview for DOC/XLS files

Description

Mimeview plugin to render in preview mode doc/xls attachments.

This plugin uses headless OpenOffice/Libreoffice to generate html.

Bugs/Feature Requests

Existing bugs and feature requests for DocRenderPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out DocRenderPlugin from here using Subversion, or browse the source with Trac.

Example

Sample init-script (tested on Debian)

#!/bin/bash
# openoffice.org  headless server script
#
### BEGIN INIT INFO
# Provides:          openoffice
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: openoffice headless
# Description:       openoffice headless
### END INIT INFO
# 
# Author: Vic Vijayakumar
# Modified by Federico Ch. Tomasczik
#
SOFFICE_PATH="/usr/lib/libreoffice/program/soffice.bin"
PIDFILE=/var/run/openoffice-server.pid

case "$1" in
    start)
    if [ -f $PIDFILE ]; then
      echo "OpenOffice headless server has already started."
      sleep 5
      exit
    fi
      echo "Starting OpenOffice headless server"
      $SOFFICE_PATH --headless --nologo --nofirststartwizard --nodefault --accept="socket,host=localhost,port=8100;urp;StarOffice.ComponentContext" & > /dev/null 2>&1
      echo $! > $PIDFILE
    ;;
    stop)
    if [ -f $PIDFILE ]; then
      echo "Stopping OpenOffice headless server."
      kill -9 `head $PIDFILE`
      rm -f $PIDFILE
      exit
    fi
      echo "Openoffice headless server is not running."
      exit
    ;;
    *)
    echo "Usage: $0 {start|stop}"
    exit 1
esac
exit 0

Execute init-script, install plugin and edit attachment section in trac.ini

[attachment]
ooo_socket = socket,host=localhost,port=8100

Recent Changes

[14475] by rjollos on 2015-03-06 05:19:01
0.3dev: Import of Trac 1.0 compatibility changes by gilado. Refs #12218.
[14474] by rjollos on 2015-03-06 04:38:13
Added extension to file.
[14473] by rjollos on 2015-03-05 14:50:01
Branching for Trac 1.0.

Author/Contributors

Author: bsavelev
Maintainer: bsavelev
Contributors: