securibox/parsextract

API wrapper for PX-Studio APIs

dev-main 2021-04-09 13:24 UTC

This package is not auto-updated.

Last update: 2024-12-28 06:42:03 UTC


README

Packagist Version

A PHP client library for the ParseXtract API

Install Package

Securibox ParseXtract PHP wrapper is installed via Composer. Simply run the following command:

composer require securibox/parsextract

Alternative: Install package from zip

If you are not using Composer, simply download and install the latest packaged release of the library as a zip.

Authentication

In order to call PX-Studio API, you need to provide a client_id and a client_secret that you can retrieve from the Settings section of PX-Studio.

Getting started

The following is the minimum needed code to list all agent details and fields:

<?php 
// If you are using Composer (recommended)
require 'vendor/autoload.php';
use Securibox\ParseXtract\ApiClient;
use Securibox\ParseXtract\Entities;

// If you are not using Composer
// require("path/to/parsextract-php/src/autoload.php");

$document = Entities\Document::LoadFromPath("C:\\Path\\To\\file.pdf");
$client = new ApiClient("Client_Id", "Client_Secret");
$result = $client->Parse($document);

foreach($result->XData as $XData){
    print("\n\n");
    print("Name: ".$XData->name."\n");
    print("Value: ".$XData->value."\n");
}

License

MIT