Skip to main content

a tool to export invoice and receipt fromlibreoffice calc into pdf file

Project description

a tool to export invoice and receipt from libreoffice calc into pdf file

virtualenv has to be created with option --system-site-packages as it needs to use system site-packages which has uno module installed by $ sudo apt-get install python3-uno, on Ubuntu. (Unfortunately, uno module is not available from pip.)

The code is based on Christopher5106’s tutorial (many thanks to him):

http://christopher5106.github.io/office/2015/12/06/openoffice-libreoffice-automate-your-office-tasks-with-python-macros.html

How it works

  • we open LibreOffice with socket open

  • we use Python to send commands to LibreOffice through the socket (you should use iptables to block incoming connection on the specified TCP port for security reason)

To open LibreOffice with socket open, use the command line below:

libreoffice \
  --accept="socket,host=localhost,port=2002;urp;StarOffice.ServiceManager"

INSTALL for USER

TO_BE_CONTINUED - the program is currently shipped as a library only, please see sample codes for how to use it from: /source/sample-code/invrcptexporter/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

invrcptexporter-0.3.tar.gz (17.9 kB view hashes)

Uploaded Source

Built Distribution

invrcptexporter-0.3-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page