Skip to content

DonkoTonev/PDF-filler

Repository files navigation

PDF Data Generator from JSON - README

This Python script is designed to generate PDF documents from JSON data. The script automates the process of populating PDF forms with provided JSON data, allowing for efficient and accurate document generation.

Features:

  • Automated PDF Population: The script automatically fills PDF forms with data provided in JSON format.
  • Customizable for Multiple Forms: The code is designed to accommodate multiple forms, allowing users to extend functionality to further pages or different forms.
  • Flexible JSON Input: Users can provide JSON data containing the necessary fields to populate the PDF forms.
  • Easy Integration: The script can be easily integrated into existing Python projects or used as a standalone application.

Usage:

  1. Install Dependencies: Make sure to have the necessary Python libraries installed. You can install dependencies using pip:

    pip install reportlab PyPDF2
    
  2. Prepare PDF Forms: Ensure that the PDF forms to be populated are accessible and have named fields. Named fields are crucial for the script to correctly map data from the JSON input.

  3. Provide JSON Data: Prepare JSON files containing the data to be populated into the PDF forms. Ensure that the JSON structure aligns with the field names in the PDF forms.

  4. Run the Script.

  5. Review Generated PDFs: The script will generate PDF documents populated with the provided JSON data. Review the generated PDFs to ensure accuracy and completeness.

Customization:

  • Extend Functionality: Users can customize the script to accommodate additional PDF forms or pages by modifying the code to handle multiple templates and data sources.
  • Enhance Error Handling: Improve error handling to gracefully handle unexpected data or file format issues.

Contribution:

Contributions to the script are welcome! Feel free to fork the repository, make changes, and submit pull requests to enhance functionality, improve documentation, or fix bugs.

Support:

For any questions, issues, or suggestions, please feel free to contact me at donkotonev04@gmail.com. Your feedback is highly appreciated and will help improve the script for all users.

License:

This project is licensed under the MIT License - see the LICENSE file for details.

Happy coding! 🚀📄