Skip to content

Fill variables (of a given dataset input) into the Austrian "Post AG - Vorlage mit Absender" letter template using ReportLab library in Python.

Notifications You must be signed in to change notification settings

roboes/at-post-letter-template

Repository files navigation

Austrian Post Letter Template

Description

This tool aims to fill variables (of a given dataset input) into the Austrian Post AG - Vorlage mit Absender letter template using ReportLab library in Python and save it as a .pdf file. The main features are:

  • Create a .pdf letter in A4 respecting the letter design settings defined by the Post AG.
  • Iteration to create a .pdf with multiple pages (one letter per page), taking recipients from a given dataset (an example is provided in the at-post-letter-template.py code).
  • Fully personalizable: each text block is divided into frames; for each frame, it is possible to change the font and font size, add boundary to the text frames, change text colors, etc. Also specific words/sentences can be formatted (bold, italic, etc.) using simple HTML.

Output

Output

Usage

Python dependencies

python -m pip install babel pandas reportlab

Functions

create_document

create_document(df, title, author, file_name)

Description

  • Fill variables (of a given dataset input) into the Austrian Post AG - Vorlage mit Absender letter template and outputs it as a .pdf file.

Parameters

  • df: DataFrame. List of Strava Club ids in which the tool should scrap data from (e.g. club_ids = ['445017', '1045852']).
  • title: str. PDF title metadata attribute (e.g. title='Post AG - Vorlage mit Absender').
  • author: str. PDF author metadata attribute (e.g. author='Post AG').
  • file_name: str. File name of the generated Austrian Post AG - Vorlage mit Absender letter template (e.g. file_name='Post AG - Vorlage mit Absender.pdf').

Documentation

Post AG Österreich - Briefgestaltung

About

Fill variables (of a given dataset input) into the Austrian "Post AG - Vorlage mit Absender" letter template using ReportLab library in Python.

Resources

Stars

Watchers

Forks

Languages