All Projects → zipreport → zipreport

zipreport / zipreport

Licence: MIT license
Python PDF reporting library

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to zipreport

a2mp3
convert (nearly) every type of (audio)file to mp3 in a quick, easy, batch-enabled way!
Stars: ✭ 43 (+186.67%)
Mutual labels:  converter
ARF-Converter
Bulk ARF file converter
Stars: ✭ 15 (+0%)
Mutual labels:  converter
fortran-legacy-tools
Three tools to deal with Fortran code: fixed to free source form converter, upper- to lowercase converter, formatter for variable declarations
Stars: ✭ 40 (+166.67%)
Mutual labels:  converter
osm-parquetizer
A converter for the OSM PBFs to Parquet files
Stars: ✭ 71 (+373.33%)
Mutual labels:  converter
hl7v2-fhir-converter
Converts HL7 v2 Messages to FHIR Resources
Stars: ✭ 40 (+166.67%)
Mutual labels:  converter
discoursegraphs
linguistic converter / merging tool for multi-level annotated corpora. graph-based (using Python and NetworkX).
Stars: ✭ 47 (+213.33%)
Mutual labels:  converter
zxtap-to-wav
Converter of .TAP files (a ZX-Spectrum emulator data format) into .WAV sound files
Stars: ✭ 34 (+126.67%)
Mutual labels:  converter
bbcode
A BBCode parser and converter written in PHP.
Stars: ✭ 32 (+113.33%)
Mutual labels:  converter
calibre-kindle-comics
A calibre plugin that converts your comics into a readable format for kindle.
Stars: ✭ 32 (+113.33%)
Mutual labels:  converter
DirectFire Converter
DirectFire Firewall Converter - Network Security, Next-Generation Firewall Configuration Conversion, Firewall Syntax Translation and Firewall Migration Tool - supports Cisco ASA, Fortinet FortiGate (FortiOS), Juniper SRX (JunOS), SSG / Netscreen (ScreenOS) and WatchGuard (support for further devices in development). Similar to FortiConverter, Sm…
Stars: ✭ 34 (+126.67%)
Mutual labels:  converter
ytdx
Download audio from YouTube videos
Stars: ✭ 55 (+266.67%)
Mutual labels:  converter
VIDEOconvertor
A stable and Fast telegram video convertor bot which can encode into different libs and resolution, compress videos, convert video into audio and other video formats, rename with thumbnail support, generate screenshot and trim videos.
Stars: ✭ 180 (+1100%)
Mutual labels:  converter
man-to-md
Converts man pages to Markdown
Stars: ✭ 51 (+240%)
Mutual labels:  converter
py midicsv
A Python port and library-fication of the midicsv tool by John Walker. If you need to convert MIDI files to human-readable text files and back, this is the library for you.
Stars: ✭ 55 (+266.67%)
Mutual labels:  converter
dalvikgate
Lightweight dex / odex / apk to jar converter
Stars: ✭ 32 (+113.33%)
Mutual labels:  converter
csv-to-sqlite
A command-line tool that copies data from CSV files into a SQLite database.
Stars: ✭ 62 (+313.33%)
Mutual labels:  converter
csv2html
Convert CSV files to HTML tables
Stars: ✭ 64 (+326.67%)
Mutual labels:  converter
ocr2text
Convert a PDF via OCR to a TXT file in UTF-8 encoding
Stars: ✭ 90 (+500%)
Mutual labels:  converter
xToBatConverter
Generate a ms batch file and inject a files inside of it. When the batch is executed, the files are extracted and executed.
Stars: ✭ 17 (+13.33%)
Mutual labels:  converter
EMBLmyGFF3
An efficient way to convert gff3 annotation files into EMBL format ready to submit.
Stars: ✭ 52 (+246.67%)
Mutual labels:  converter

ZipReport

Tests docs pypi license

Transform HTML templates into beautiful PDF or MIME reports, with full CSS and client Javascript support, under a permissive license.

Want to see it in action? Check this example!

Highlights:

  • Create your reports using Jinja templates;
  • Dynamic image support (embedding of runtime-generated images);
  • Reports are packed in a single file for easy distribution or bundling;
  • Optional MIME processor to embed resources in a single email message;
  • Support for generated JS content (with zipreport-server or zipreport-cli);
  • Support for headers, page numbers and ToC (via PagedJS, see below);

Requirements:

  • Python >= 3.7
  • Jinja2 >= 3.1
  • Compatible backend for pdf generation (zipreport-server, zipreport-cli, xhtmltopdf, or WeasyPrint);

Note: For previous Jinja2 versions, zipreport-lib 0.9.5 is functionally similar.

Installation

Installing via pip:

$ pip install zipreport-lib
Quick example

Using zipreport-cli backend to render a report file:

from zipreport import ZipReportCli
from zipreport.report import ReportFileLoader

# path to zipreport-cli binary
cli_path = "/opt/zpt-cli/zpt-cli"

# output file
output_file = "result.pdf"

# template variables to be used for rendering
report_data = {
	'title': "Example report using Jinja templating",
	'color_list': ['red', 'blue', 'green'],
	'description': 'a long text field with some filler description so the page isn\'t that empty',
}

# load zpt report file
zpt = ReportFileLoader.load("reports/simple.zpt")

# render the report with default job options
result = ZipReportCli(cli_path).render_defaults(zpt, report_data)

if result.success:
	# write output file
	with open(output_file, 'wb') as rpt:
		rpt.write(result.report.read())

Paged.js

Paged.js is an amazing javascript library that performs pagination of HTML documents for print, under MIT license. It acts as polyfill for W3C specification for print, and allows the creation of headers, footers, page numbers, table of contents, etc. in the browser.

Available backends

zipreport-server/zipreport-cli

This is the recommended backend to use, that enables full usage of client-side JavaScript and leveraging the Paged.js capabilities.

zipreport-cli is an electron-based command-line utility used to convert webpages to PDF.

zipreport-server is a daemon that allows the usage of zipreport-cli via API.

WeasyPrint

This backend is provided for compatibility. For new projects, please use zipreport-cli or zipreport-server.

WeasyPrint is a popular Python library to generate PDFs from HTML. It doesn't support JavaScript, and CSS is limited.

wkhtmltopdf

This backend is provided for compatibility. While it supports some JavaScript, it's not able to run Paged.js.

Wkhtmltopdf is a binary utility based on QtWebKit to generate PDF files from HTML pages. While it features some JavaScript and CSS support, the underlying library is obsolete.

Documentation

Detailed documentation on usage and report building is available on the project documentation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].