PHPackages                             tecsiaron/ublrenderer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tecsiaron/ublrenderer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tecsiaron/ublrenderer
=====================

UBL 2 HTML renderer (PHP)

0.0.1-alpha(1y ago)25711Apache-2.0PHPPHP 8.1CI passing

Since Jul 18Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/TecsiAron/ublrenderer)[ Packagist](https://packagist.org/packages/tecsiaron/ublrenderer)[ RSS](/packages/tecsiaron-ublrenderer/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (1)

UBLRenderer
===========

[](#ublrenderer)

STILL IN TESTING PHASE
Should not be used in production
PHP Library to convert RO eFactura UBL/ZIP files to HTML/PDF\*
Check [Sample PDF](https://github.com/TecsiAron/ublrenderer/blob/main/sample_output/sample.pdf) and [Sample HTML](https://github.com/TecsiAron/ublrenderer/blob/main/sample_output/sample.html)
Uses Twig for templating and supports user defined templates.
Requirements:

- php 8.2 or newer
- ext-xmlreader
- ext-bcmath
- ext-zip
- ext-libxml

Instalation:

```
composer require tecsiaron/ublrenderer

```

Usage in shell:

```
php vendor/bin/ubl2html.php

```

Simple usage in php (with XML file):

```
$content=file_get_contents("path_to.xml");
$renderer = new UBLRenderer($content);
$renderer->WriteFile();
```

Simple usage with ANAF ZIP

```
$content=UBLRenderer::LoadUBLFromZip("test.zip")->ubl;
$renderer = new UBLRenderer($content);
$renderer->WriteFile();
```

In both of the above cases the file will be written to vendor/tecsiaron/ublrenderer/output
To specify where files are written call WriteFile (or WriteFiles) like this:

```
$renderer->WriteFiles(new HTMLFileWriter("path_to_output.html"));
```

Advanced usage:

```
// get the contents of the XML
$renderer = new UBLRenderer($content);
$invoice=$renderer->ParseUBL();
$validation=$invoice->CanRender();
$validationFailReason="Validation failed:\n";
if(is_array($validation))
{
	echo "Failed to render invoice: ". implode("\n", $validation)
}
else
{
	$html=$renderer->CreateHTML(invoice);
}
```

\*For PDF support install ublrenderer-pdf and use PDFWriter

```
composer require tecsiaron/ublrenderer-pdf
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance51

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

716d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/206812dc0b9d21437229038a3544110adf650818a3866ac3bd20a26dd55626a4?d=identicon)[TecsiAron](/maintainers/TecsiAron)

---

Top Contributors

[![TecsiAron](https://avatars.githubusercontent.com/u/4922350?v=4)](https://github.com/TecsiAron "TecsiAron (123 commits)")

---

Tags

anafanaf-ro-efacte-facturaefacturaphpphp8ro-e-facturaubl

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tecsiaron-ublrenderer/health.svg)

```
[![Health](https://phpackages.com/badges/tecsiaron-ublrenderer/health.svg)](https://phpackages.com/packages/tecsiaron-ublrenderer)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
