mattermost-plugin-topdf

module
v0.0.0-...-96b67c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2019 License: Apache-2.0

README

mattermost-plugin-topdf

TOPDF plugin automatically generates PDF previews of Microsoft Office files attached to posts for use with Mattermost. The plugin itself depends on Gotenburg for the heavy lifting, but seamlessly intercepts attachments to generate the previews without further user interaction.

Installation

  1. Install Gotenberg server since this plugin depends on it to actually convert files to PDFs. Assuming you have already installed Docker, following command will download and install the latest version of Gotenberg and set up a server with an open port at 4798:
  docker run -d -p 4798:3000 --env DEFAULT_WAIT_TIMEOUT=600 --env MAXIMUM_WAIT_TIMEOUT=600 thecodingmachine/gotenberg:6

Make sure that you've set large timeouts for Gotenberg server like in the sample above since converting big files takes time.

For more information about how to install & customize Gotenberg server, please follow the docs.

  1. Go to the releases page of this Github repository and download the latest release for your Mattermost server.

  2. In the Mattermost System Console under System Console > Plugins > Plugin Management upload the file to install the plugin. To learn more about how to upload a plugin, see the documentation.

  3. Once Gotenberg server is running, configure the plugin to make requests to your Gotenberg instance. Go to System Console > Plugins > TOPDF and configure Gotenberg's Full Address to point at your Gotenberg instance.

  4. Enabled the plugin at System Console > Plugins > TOPDF and ensure it starts with no errors by checking the server logs.

Testing

To test your configuration is correct, post an Office file like .docx to a channel and click on it to preview. If you see the content of document in a popup everything works fine.

TODO

  • webapp/src/delete should be deleted when PDFPreview component is accessible through Plugin API.

Directories

Path Synopsis
build
gotenberg
Package gotenberg is a Gotenberg client with stream (io.Reader) support.
Package gotenberg is a Gotenberg client with stream (io.Reader) support.
x
Packages x contains xpackages where each package's purpose to extend features of its origin.
Packages x contains xpackages where each package's purpose to extend features of its origin.
x/xtime
package xtime extends features of package "time".
package xtime extends features of package "time".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL