Download the PHP package whitedigital-eu/document-generator-bundle without Composer

On this page you can find all versions of the php package whitedigital-eu/document-generator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package document-generator-bundle

Document Generator bundle

What is it?

Document Generator bundle is step based document generator library for projects using symfony and api-platform.

System Requirements

PHP 8.2+
Symfony 6.3+

Installation

The recommended way to install is via Composer:

After this, you need to update your database schema to use Document entity.
If using migrations:

If by schema update:

This will enable new Document api resource with /api/documents iri.

Components

  1. Task - requirement and config class that extends AbstractDocumentTask and defines most of the logical parts in document generator.
  2. Transformer - class that transforms input data into structure defined in your defined task.
    For now, package only comes with transformer that turns twig into pdf but this can be changed within project by creating your own transformers by implementing TransformerInterface
  3. Generator - class that produces a generated result (binary data of path to a file), from defined data, template and additional, optional context
  4. GeneratorContext - class that holds additional, optional context for generator to perform the document generation
  5. Html to Pdf service - reusable service to generate pdf files from html. Here used within transformer but can be used elsewhere. Uses gotenberg in background.

Usage

  1. Define new Task that extends AbstractDocumentTask

and define required functions:
__construct

AbstractDocumentTask requires 3 services:

  1. EntityManagerInterface
  2. Generator - TwigToPdfGenerator from library or other defined one
  3. Transformer - service defined by you (more about it below)

getTransformerFields

getTemplatePath

getType

getInputType

  1. Define new Transformer that implements TransformerInterface:

transformer can return none, some or all of the fields listed in getTransformedFields an array of fields

  1. Use generation Defined task can now be used as a service

Input of generate function must be type defined in Transformer.
generate function will return already Document entity or throw an error if something is wrong.

Regenerate

If for any reason you need to regenerate existing document, you can use built-in DocumentTask with existing document entity.


All versions of document-generator-bundle with dependencies

PHP Build Version
Package Version
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package whitedigital-eu/document-generator-bundle contains the following files

Loading the files please wait ....