Git Product home page Git Product logo

foptility's Introduction

Foptility

Spring boot application that generates pdf files starting from a set of xslt templates and a collection of parameters specifically formatted.


Rest API that exposes method to perform PDF generation given its content. This application only generates PDF associated with product tracking workflow relative to Italian land production of small enterprises.

Currently are handled only 6 types of documents that are the following:

  • Tracciabilità piante e semi
  • Tracciabilità materie prime
  • Checlist materie prime
  • Tracciabilità prodotto finito (lavorazione)
  • Controllo pulizie
  • Tracciabilità prodotto finito

How to use

Execute a POST request to the exposed endpoint and provide a JSON well-formatted containing all required parameters. The provided JSON must be wrapped in parameters object and must contain:
  1. Filename associated with the required PDF (ChecklistMateriePrime.pdf, ControlloPulizie.pdf, LavorazioneProdottoFinito.pdf, TracciabilitaMateriePrime.pdf, TracciabilitaPianteESemi.pdf, TracciabilitaProdottoFinito.pdf).
  2. Information about the footer, composed of two fields: title and subtitle (can be left empty).
  3. A list of items containing all custom text to inject in the PDF. This can vary from template to template.
  4. A field productInfo that contains generic properties. Only necessary for specific templates.

Following is a snipped example that can be executed with a REST Client.

POST https://foptility/transform/json
Content-Type: application/json

{
    "parameters": {
        "filename": "TracciabilitaMateriePrime.pdf",
        "footer": {
          "title": "Enterprise Name",
          "subtitle": "Enterprise subtitle"
        },
        "items": {
          "plants": "Tomatoes",
          "origin": "Autoproduzione',
          "lot": "123ABC",
          "isCompliant": true,
          "kg": "12",
        }
    }
}

The application uses Java11+ and Maven 3.6+.

foptility's People

Contributors

simone-lungarella avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.