A bulk pdf generator. This application can generate PDFs in bulk by using just one click.

Overview

logo

forks-badge stars-badge watcher-badge repo_size-badge CodeFactor

A bulk html pdf generator. This application can generate PDFs in bulk by using just one click.

Screenshots

demo1 demo2

Requirements ๐Ÿงฑ

Your system must have the following tools installed and setup with system path variables updated before you can use this software.

  • Python3
  • pip package manager
  • GTK3 Runtime (for Windows, MacOS and few linux based systems). You can get GTK form here ๐Ÿ‘‰ For Windows, For MacOS, For Linux

    Note: Your system might already have gtk3 installed. You need not install gtk dev dependencies.

Getting started ๐Ÿš€

To run the application from the source code you need to meet few basic requirements. Once that is done we are ready to do the setup.

To prepare the environment you need to follow these steps:

  • Execute the prep.sh script which will make virtual environment. Here is an example for debian based system:

    $ chmod +x prep.sh
    $ ./prep.sh
  • Now we can activate the environment. Here is an example:

    • For Unix or MacOS based system:

      $ source env/bin/activate
    • For Windows based system:

      $ env\Scripts\activate.bat

      Note: Your pwd must be the src directory or else you need to provide full path of the activate script.

    • To deactivate use the following command:

      $ deactivate
  • Now we are ready to install the required packages. Run the following command to install all the required packages:

    $ pip install -r requirements.txt
  • Once we are done with installing packages. We are ready to execute the application using python. Here is an example:

    $ python app.py

Note: To run this software successfully you need to make sure you have GTK3 installed.

How to use? ๐Ÿ’ก

When the application is launched it has a single window with a few but important options. The application uses special syntax to generate customized content. Lets have a brief walk through it:

The application uses HTML and CSS to render document designs. We have provided some pre-build templates but feel free to load your custom design.

Template variable syntax ๐Ÿ”ฅ

To make the document generation versatile and make customization possible we added a variable syntax in system for the templates which will be used to render real value from the data file.

  • A variable is surrounded by %.

    Example: %label%

  • A label is the column name of the data file. It is the first row of the .csv file.
Number Alpha Beta Gamma ๐Ÿ‘ˆ These are the labels
1 100 40 0.5
2 90 80 0.7
3 150 20 0.1

Note: Labels are case sensitive.

Here is an example

template.html

Certificate of Completion

This is to certify that

%Name%

has completed the course

%Course%

with score of %Score%



">
<style>
  @page {
    size: 890px 690px;
    margin: auto;
  }
style>
<div
  style="width:800px; height:600px; padding:20px; text-align:center; border: 10px solid #787878"
>
  <div
    style="width:750px; height:550px; padding:20px; text-align:center; border: 5px solid #787878"
  >
    <span style="font-size:50px; font-weight:bold"
      >Certificate of Completionspan
    >
    <br /><br />
    <span style="font-size:25px"><i>This is to certify thati>span>
    <br /><br />
    <span style="font-size:30px"><b>%Name%b>span ><br /><br /> <span style="font-size:25px"><i>has completed the coursei>span> <br /><br /> <span style="font-size:30px">%Course%span> <br /><br /> <span style="font-size:20px">with score of <b>%Score%b>span> <br /><br /><br /><br /> div> div>
data.csv
Name Course Score ๐Ÿ‘ˆ These are the labels
Aman Nirala Quantum Information 95

PDF output

Steps to use ๐Ÿง

  1. Select your HTML template file in the application (this file is important).
  2. Select style(css) file for additional design customization (optional).
  3. Then choose your data file(.csv).

    Note: The data file needs to be a .csv i.e. comma(,) separated file. The first row is considered as "label" information and not data instance. This is important as this "label" will be used in the template file as variables.

  4. Next you need to define an output file name format. This is optional, you can leave is empty and it will auto-generate file name based on the data.

    Note: You have to follow variable syntax format for defining file name. Here is an example: %label-1%_MIT_%label-2%.pdf.

  5. Now you need to select the output directory in which all the documents will be saved.
  6. Finally it's time to do a final check and tweaks before staring the document generation process.(Don't forget to save the changes made to the template or style files in the application before starting to process.)
  7. Once everything is done, press the Generate button and wait for the program to finish the process.

License

FOSSA Status

Contributors โœจ

All Contributors

Thanks goes to these wonderful people (emoji key):


Aman Nirala

๐Ÿ’ป ๐Ÿ“– ๐Ÿค” ๐ŸŽจ

This project follows the all-contributors specification. Contributions of any kind welcome!


github_follow_badge twitter-badge

If you like our work, a bit of contribution would motivate us a lot for more open source contributions.

You might also like...
Auto Convert PDFs to png files in python

This python tool, which is an application of PyMuPDF module, could auto convert PDFs to png files

pdf_sprinkles: sprinkles text in your PDFs

pdf_sprinkles: sprinkles text in your PDFs pdf_sprinkles remotely OCRs a PDF with Google Cloud Document AI, and returns the result as a PDF with searc

Scans pdfs for links written in plaintext and checks if they are active or returns an error code.
Scans pdfs for links written in plaintext and checks if they are active or returns an error code.

Scans pdfs for links written in plaintext and checks if they are active or returns an error code. It then generates a report of its findings. Extract references (pdf, url, doi, arxiv) and metadata from a PDF.

Merge multiple PDF files into one.

PDF Merger Merge multiple PDF files into one. Usage % python pdf_merger.py -h usage: pdf_merger.py [-h] [-o OUTPUT] [-f [FILES ...]] optional argumen

Simple HTML and PDF document generator for Python - with built-in support for popular data analysis and plotting libraries.

Esparto is a simple HTML and PDF document generator for Python. Its primary use is for generating shareable single page reports with content from popular analytics and data science libraries.

A Python tool to generate a static HTML file that represents the internal structure of a PDF file
A Python tool to generate a static HTML file that represents the internal structure of a PDF file

PDFSyntax A Python tool to generate a static HTML file that represents the internal structure of a PDF file At some point the low-level functions deve

Generate a preview image for a PDF.
Generate a preview image for a PDF.

PDF โžก๏ธ Preview A simple tool to save me time on Illustrator. Generates a preview image for a PDF file. Useful for sneak peeks to academic publications

CLI tool to generate pdf invoices written in python
CLI tool to generate pdf invoices written in python

invoicepy CLI invoice tool, store and print invoices as pdf. save companies and customers for later use. installation pip install invoicepy config co

An application which enables the users to perform simple yet intriguing PDF operations

AstutePDF A repository containing the GUI for an application which enables the users to perform simple yet intriguing PDF operations. These include, M

Comments
Owner
Aman Nirala
Computer Science and Physics student. Quantum Computing and Mechanics Researcher. Reclusive like a neutrino. A photon to the higgs field of giving up.
Aman Nirala
This is PDF Merger Application Developed using Just Python

This is PDF Merger Application Developed using Just Python

Sandeep Kumar Reddy 2 Nov 18, 2021
Camelot is a Python library that can help you extract tables from PDFs!

A Python library to extract tabular data from PDFs

null 1.8k Jan 3, 2023
Generate a bunch of malicious pdf files with phone-home functionality. Can be used with Burp Collaborator

Malicious PDF Generator โ˜ ๏ธ Generate ten different malicious pdf files with phone-home functionality. Can be used with Burp Collaborator. Used for pene

Jonas Lejon 1.9k Jan 1, 2023
PyPDF2 is a pure-python PDF library capable of splitting, merging together, cropping, and transforming the pages of PDF files.

PyPDF2 is a pure-python PDF library capable of splitting, merging together, cropping, and transforming the pages of PDF files. It can also add custom data, viewing options, and passwords to PDF files. It can retrieve text and metadata from PDFs as well as merge entire files together.

Matthew Stamy 5k Jan 4, 2023
Trata PDF para tornรก-lo compatรญvel com PDF/X e com impressoras em escala de cinza.

tratapdf Trata PDF para tornรก-lo compatรญvel com PDF/X e com impressoras em escala de cinza. dependรชncias icc-profiles ghostscript visualizador de PDF

null 1 Nov 30, 2021
PDFSanitizer - Renders possibly unsafe PDF files and outputs harmless PDF files

PDFSanitizer Renders possibly malicious PDF files and outputs harmless PDF files

null 9 Jan 30, 2022
Compare-pdf - A Flask driven restful API for comparing two PDF files

COMPARE-PDF A Flask driven restful API for comparing two PDF files. Description

Karthikeyan JC 3 Mar 13, 2022
Convert PDF to AudioBook and Audio Speech to PDF

In this Python project, we will build a GUI-based PDF to Audio and Audio to PDF converter using the Tkinter, OS, path, pyttsx3, SpeechRecognition, PyPDF4, and Pydub libraries and the messagebox module of the Tkinter library.

RISHABH MISHRA 1 Feb 13, 2022
Small python-gtk application, which helps the user to merge or split pdf documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface

Small python-gtk application, which helps the user to merge or split pdf documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface

null 1.8k Dec 29, 2022
Pdfencrypt is a tool to encrypt/lock PDFs

Pdfencrypt Pdfencrypt is a tool to encrypt/lock PDFs Installation $ apt update $ apt upgrade $ apt install git $ apt install python $ git clone https:

Anontemitayo 5 Nov 28, 2021