Colony Print Infra-structure
Project description
Colony Print Infra-structure
Small web app for printing Colony-based documents.
This project includes two main components:
- The Web App end-point that provides XML to Binie conversion
colony_print.controllers
- The structure conversion infra-structure (Visitors, AST, etc.)
colony_print.printing
Features
- XMPL to Binie conversion
- PDF generation with custom fonts and images
- GDI printing (Windows) via Colony NPAPI (npcolony)
- CUPS printing (Linux) via Colony NPAPI (npcolony)
Binie Specification
For a detailed understanding of the Binie file format used in this project, refer to the Binie File Format Specification. This document outlines the structure and organization of the Binie file format, which is essential for developing compatible applications and tools.
XMPL Specification
The XML Markup Language for Printing (XMPL) is integral to our document processing pipeline. For an in-depth understanding of the XMPL structure and its seamless convertibility to Binie, see the XMPL File Format Specification.
Installation
Pre-requisites
apt-get install gcc python-dev
pip install --upgrade appier netius pillow reportlab
Run Server
pip install colony_print
python -m colony_print.main
Run Node
pip install colony_print
BASE_URL=$BASE_URL \
SECRET_KEY=$SECRET_KEY \
NODE_ID=$NODE_ID \
NODE_NAME=$NODE_NAME \
NODE_LOCATION=$NODE_LOCATION \
python -m colony_print.node
Fonts
To be able to use new fonts (other than the ones provided by the system), one must install them
into the /usr/share/fonts/truetype
directory so they are exposed and ready to
be used by the PDF generation infra-structure. For example, Calibri is one type of font that should
be exported to a UNIX machine as many colony-generated documents use it.
Development
To run a localhost development server, use the following commands:
PORT=8686 \
PYTHONPATH=$BASE_PATH/colony_print/src python \
$BASE_PATH/colony_print/src/colony_print/main.py
License
Colony Print Infra-structure is currently licensed under the Apache License, Version 2.0.
Build Automation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for colony_print-0.4.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 289f115bb015cf3cdf7fa1359e1905e38b89b5dd439fd7e8352ac02fe4ce7859 |
|
MD5 | b495250fe112c934a747116affd15b7c |
|
BLAKE2b-256 | 90ff304c7a94e5a6efb639564f4ecfe849c434ac55593ec27d4af2a461c0947c |