PDF API. JSON to PDF. PDF Template Management, Visual HTML Template Editor and API to render PDFS by json data

Overview

Alt text Alt text

PDF Template Management, Visual HTML Template Editor and API to render PDFS by json data

PDF ENGINE

VERSION: development: This is a prerelease version, feel free to play with it and to submit feature requests

Planned features until the first release:

  • User Management and JWT login for API
  • Documentation
  • Installation guide
  • Dolibarr Connector

IMPORTANT!

The system has 2 dependencies:
wkhtmltopdf must be installed and the php function proc_open must be active!

Short installation guide, for those who can't wait.

  • 1. Copy all the files to your web server.
  • 2. create a mysql database.
  • Now navigate to the pdfengine folder (where app, public, etc. are located) where you will find an .env file (or rename .env.example to .env). In this file you have to adjust the following fields:

    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1 <--- your database host (or localhost)
    DB_PORT=3306
    DB_DATABASE=pdfengine <--- database name
    DB_USERNAME=root <--- database user
    DB_PASSWORD= <--- database password

    Further, the following should be adjusted in the .env:
    APP_KEY= <--- Enter a base64 encryption key here.
    APP_URL=http://localhost <--- Enter the apphost here.

  • Save the .env file and execute the following command in the terminal:
    php artisan migrate
  • This command creates the necessary database tables.
    The system is based on Laravel, therefore the public folder must be selected as the "running directory" and rewrite rules must be used according to the Laravel documentation.

    Now the PDF engine can already be used http://localhost/templates

    Use of the API

    After the PDF engine has been installed and the first template has been created, the template can be accessed via the API link. To do this, data and filename must be sent via POST as json.
    Example: The template is called invoice
    POST http://localhost/api/render/template/invoice
    {
    "data":{"docname": "invoice"},
    "filename":"invoice123"
    }

    Include data in the PDF.

    The PDF engine uses https://handlebarsjs.com/ to render the JSON data into the PDF.
    If, for example, {{docname}} is included in a template, the text that was transferred in the JSON with the key "docname" will appear later in the PDF at this position.

You might also like...
KodExplorer is a file manager for web. It is also a web code editor, which allows you to develop websites directly within the web browser.
KodExplorer is a file manager for web. It is also a web code editor, which allows you to develop websites directly within the web browser.

KodExplorer is a file manager for web. It is also a web code editor, which allows you to develop websites directly within the web browser.

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)

COPS COPS stands for Calibre OPDS (and HTML) Php Server. See : COPS's home for more details. Don't forget to check the Wiki. Why ? In my opinion Calib

html-sanitizer is a library aiming at handling, cleaning and sanitizing HTML sent by external users

html-sanitizer html-sanitizer is a library aiming at handling, cleaning and sanitizing HTML sent by external users (who you cannot trust), allowing yo

Sanitize untrustworthy HTML user input (Symfony integration for https://github.com/tgalopin/html-sanitizer)

html-sanitizer is a library aiming at handling, cleaning and sanitizing HTML sent by external users (who you cannot trust), allowing you to store it and display it safely. It has sensible defaults to provide a great developer experience while still being entierely configurable.

 Learning about - Basic HTML & CSS, JSON, XML, Session & Cookies, CRUD Operations in Php using MySQL and Create MVC from scratch
Learning about - Basic HTML & CSS, JSON, XML, Session & Cookies, CRUD Operations in Php using MySQL and Create MVC from scratch

This Project is based on course CSC 3215. Learning about - Basic HTML & CSS, JSON, XML, Session & Cookies, CRUD Operations in Php using MySQL and Create MVC (Model–View–Controller) from scratch. Just learning about web technologies, Not focusing on UI (Bootstrap or other 3rd-Party UI libraries or frameworks).

The main website source code based on php , html/css/js and an independent db system using xml/json.
The main website source code based on php , html/css/js and an independent db system using xml/json.

jsm33t.com Well umm, a neat website LIVE SITE » View Demo · Report Bug · Request a feature About The Project Desc.. Built Using Php UI Frameworks Boot

A simple library for management the DOM (XML, HTML) document.

A simple library for management the DOM (XML, HTML) document.

Minimal HTML login page that uses a json file as a database

JSONlogin Minimal HTML login page that uses a json file as a database Minimal login system that requires a new user to input username, password and th

Allows generate class files parse from json and map json to php object, including multi-level and complex objects;

nixihz/php-object Allows generate class files parse from json and map json to php object, including multi-level and complex objects; Installation You

Owner
Ajous Solutions
Ajous Solutions
A visual process builder

DataStory ⚡ visual programming DataStory provides a workbench for designing data flow diagrams. ⚠️ We have moved to an organisation ?? Live Demo data-

Anders Jürisoo 120 Dec 12, 2022
An Alfred 4 workflow for quickly opening directories in Visual Studio Code

Alfred Workflow - Open in Visual Studio Code An Alfred 4 workflow opening files or folders with Visual Studio Code. Note: Alfred Powerpack is required

Daan Hage 2 Jun 27, 2022
Your visual bookmark manager

Colllect Introduction Colllect is your new bookmark manager! With it, you can manage your inspiration and resources into colllections. Go to Colllect

Colllect 336 Jan 4, 2023
JSON Editor for Laravel-admin

JSON Editor extension for laravel-admin This is a laravel-admin extension that integrates JSON Editor into laravel-admin. DEMO Login using admin/admin

Extensions for laravel-admin 27 Nov 5, 2022
A package to render Heroicons in your PHP application.

PHP Heroicons A package to render Heroicons in your PHP application. Preview the icons at heroicons.com, developed by Steve Schoger and Adam Wathan. I

Roel Magdaleno 3 Aug 13, 2021
A package to render form fields in WordPress settings pages.

WP Settings Page Fields A package to render form fields in WordPress settings pages. You might need a settings page with a form and its fields and you

Roel Magdaleno 5 Jul 22, 2022
Easy management of Virtualization technologies including KVM, Xen, OpenVZ, Virtuozzo, and LXC/LXD including unified commands, monitoring, template management, and many more features.

ProVirted About Easy management of Virtualization technologies including KVM, Xen, OpenVZ, Virtuozzo, and LXC/LXD including unified commands, monitori

null 2 Aug 22, 2022
Allow SVG images to be used in Magento CMS blocks and pages via the TinyMCE Wysiwyg Editor.

Hyvä Themes - SVG support for the Magento CMS Wysiwyg Editor Allow SVG images to be used in CMS blocks and pages via the TinyMCE Wysiwyg Editor. hyva-

Hyvä 14 Dec 15, 2022
Melek Berita Backend is a service for crawling data from various websites and processing the data to be used for news data needs.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Chacha Nurholis 2 Oct 9, 2022
Provides powerful menu editor to replace category based menus in Magento 2

Magento 2 Menu Provides powerful menu editor to replace category based menus in Magento 2. Setup Create new menu in the admin area Content > Elements

SNOW.DOG 230 Nov 17, 2022