Skip to content

Commit b99d663

Browse files
authored
Modificat exemplul.
1 parent 02573c1 commit b99d663

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,18 @@ Ministerul de Finanțe pune la dispoziție o ["aplicație"](https://www.anaf.ro/
1414
```php
1515
<?php
1616

17-
require_once('tcpdf/tcpdf.php');
17+
require_once('tcpdf/tcpdf.php'); // https://github.com/tecnickcom/tcpdf
18+
require_once('fpdi/src/autoload.php'); // este opțional dacă se dorește includerea anexelor în format PDF (https://github.com/Setasign/FPDI)
1819
require_once('xml2pdf.php');
1920

20-
$xmlString=file_get_contents('factura.xml');
21+
$xmlString=file_get_contents('exemplu.xml');
2122
$factura=xml2pdfParse($xmlString);
2223

2324
if ($factura===false) {
2425
exit('Eroare la parcurgerea fișierului XML.');
2526
}
2627

27-
$r=xml2pdfRender($factura,true);
28-
header("Content-type:application/pdf");
29-
echo $r;
28+
xml2pdfRender($factura,false,'factura {{furnizor}} ({{numar}} din {{data}})');
3029

3130
?>
3231
```

0 commit comments

Comments
 (0)