Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

unicsmcr/contract_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

PDF Contract Generator

Dependencies:

  • Python 3 - download here
  • pdfkit - to install run pip install pdfkit
  • wkhtmltopdf - installation instructions here

Usage:

The script takes an html template and a csv data file and produce a pdf file for each of the rows in the data file. The name of the generated file is: {firstColumnValueInDataFile}.pdf

Script can be run with: python pdfContract.py {template} {csvDataFile} {outputFolder}

NOTE: the structure of the csv file is defined within the template

Creating templates:

The templates for the script are defined in HTML and CSS

NOTE: the CSS for the template must be defined within the HTML file

Placeholders can be defined with the following syntax: [colx] where x is the column number (starting from 0) in the csv data file.

EXAMPLE: The template:

<html>
<p>First name: [col0]</p>
<p>Last name: [col1]</p>
</html>

and the data file:

Kristijonas,Zalys

would result in a pdf file: Kristijonas.pdf:

First name:  Kristijonas
Last name: Zalys

About

A pdf contract generator script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages