PHP code example of antonshell / egrul-nalog-parser

1. Go to this page and download the library: Download antonshell/egrul-nalog-parser library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

antonshell / egrul-nalog-parser example snippets




$parser = new \antonshell\EgrulNalogParser\Parser();

// parse, auto detect type
$path = __DIR__ . '/nalog_pe.pdf';
$results = $parser->parseDocument($path);



$parser = new \antonshell\EgrulNalogParser\Parser();

// parse for Individual Entrepreneur
$pathPe = __DIR__ . '/nalog_pe.pdf';
$results = $parser->parseNalogPe($pathPe);



$parser = new \antonshell\EgrulNalogParser\Parser();

// parse for Organization
$pathOrg = __DIR__ . '/nalog_org.pdf';
$parser->parseNalogOrg($pathOrg);