wexample / symfony-remote-document-reader
Client of a document-reader service: what a PDF carries besides its pages (attachments, Factur-X), and documents converted by docling, declared as a symfony-remote
Package info
github.com/wexample/symfony-remote-document-reader
pkg:composer/wexample/symfony-remote-document-reader
Requires
- php: >=8.5
- symfony/http-client: >=7.0
- wexample/symfony-helpers: >=18.0.2
- wexample/symfony-remote: >=2.0.10
Requires (Dev)
- phpunit/phpunit: ^13
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Version: 2.0.4
Client of a document-reader service: what a PDF carries besides its pages (attachments, Factur-X), and documents converted by docling, declared as a symfony-remote
Table of Contents
Installation
// config/bundles.php Wexample\SymfonyRemote\WexampleSymfonyRemoteBundle::class => ['all' => true], Wexample\SymfonyRemoteDocumentReader\WexampleSymfonyRemoteDocumentReaderBundle::class => ['all' => true],
# config/packages/wexample_symfony_remote_document_reader.yaml wexample_symfony_remote_document_reader: url: '%env(default::DOCUMENT_READER_URL)%' # e.g. http://document_reader:8000
Without a URL the remote reports itself unconfigured and every call throws.
symfony-remote-document-reader is the Symfony client of a document-reader service, which reads documents written by others in a sandbox, never in the application's process. DocumentReaderClient is declared as a symfony-remote, so remote:status checks the service.
read() posts any document docling reads (PDF, DOCX, XLSX, CSV, HTML, images…) and returns a DocumentReading in the shared norm, the same document, attachments and output that pdf-factory renders from:
- the content of the pages, read by docling;
- for a PDF, what the file says about itself, its attachments with their bytes, and its Factur-X.
The package knows no document of its own: what an invoice's XML says is read by the package that owns invoices.