<commit_before>##Installation instruction 
Regarding the assignment provided.

Step1: Place this project at the server.

Step2: Send request using curl or postman or any POST method sender with variables values. 

Curl example: curl -X POST --data "UserRequest='{"header": [..array of object..], "footer": [..array of object..]'" Your server url to CrimsonPDF/src/ratiw/JsonPDF/test/

Step3:
Prepare json array like 

    {
        "header":   [..array of object..],
        "footer":   [..array of object..],
        "body":     [..array of object..],
        "settings": [
            "title":    "Document Title",
            "author":   "<NAME>",
            "subject":  "Subject",
            "creator":  "Generator name",
            "keywords": "list of keywords here",
            "defaultFont": [
                "name": "FontName",
                "size":  16
            ]
        ],
        "fonts":    [..array of font to be added..],
        "data":     [..array of data..],
        "tables":   [..table definition..]
    }
Step4:
Send above json to this dir CrimsonPDF/src/ratiw/JsonPDF/test/ with POST method with variablename as UserRequest and value as above json in string. Eg: UserRequest='{"header": [..array of object..], "footer": [..array of object..]'


Step5:
You will get output in pdf format. For different options in json to send please refer below doc. We have used Third-party Api to I/O pdf.

__JsonPDF__ is a wrapper class for [FPDF](http://www.fpdf.org) to allow creating PDF document from [JSON](http://en.wikipedia.org/wiki/JSON) data.


##Install using Composer
Just add the requirement to you `composer.json` file.

    {
        "require": {
            "ratiw/jsonpdf": "~1.0"
        }
    }
<commit_msg>Updated Readme installation instruction<commit_after>##Installation instruction 
Regarding the assignment provided.

Step1: Place this project at the server.

Step2: Send request using curl or postman or any POST method sender with variables values. 

Curl example: curl -X POST --data "UserRequest='{"header": [..array of object..], "footer": [..array of object..]'" Your server url to CrimsonPDF/src/ratiw/JsonPDF/test/

Step3:
Prepare json array like 

    {
        "header":   [..array of object..],
        "footer":   [..array of object..],
        "body":     [..array of object..],
        "settings": [
            "title":    "Document Title",
            "author":   "<NAME>",
            "subject":  "Subject",
            "creator":  "Generator name",
            "keywords": "list of keywords here",
            "defaultFont": [
                "name": "FontName",
                "size":  16
            ]
        ],
        "fonts":    [..array of font to be added..],
        "data":     [..array of data..],
        "tables":   [..table definition..]
    }
Step4:
Send above json to this dir CrimsonPDF/src/ratiw/JsonPDF/test/ with POST method with variablename as UserRequest and value as above json in string. Eg: UserRequest='{"header": [..array of object..], "footer": [..array of object..]'


Step5:
You will get output in pdf format. For different options in json to send please refer below doc. We have used Third-party Api to I/O pdf.
```
__JsonPDF__ is a wrapper class for [FPDF](http://www.fpdf.org) to allow creating PDF document from [JSON](http://en.wikipedia.org/wiki/JSON) data.
```

##Install using Composer
Just add the requirement to you `composer.json` file.

    {
        "require": {
            "ratiw/jsonpdf": "~1.0"
        }
    }

{'fraction_non_alphanumeric': 0.1362862010221465, 'fraction_numerical': 0.005110732538330494, 'mean_word_length': 2.274163568773234, 'pattern_counts': {'":': 42, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2574475', 'n_tokens_mistral': 1041, 'n_tokens_neox': 1007, 'n_words': 375}